fork(1) download
  1. #include "StdAfx.h"
  2. #include <stdio.h>
  3. #include <iostream>
  4. using namespace std;
  5. Void main()
  6. {
  7. double x.x1=20.0001,x0=-20,dx=5,y;
  8. x=x0;
  9. while ((x<2)&&(x<x1))
  10. {
  11. y=x;
  12. cout.width(3);
  13. cout.precision(5);
  14. cout<<"x="<<x<<"y="<<y<<endl;
  15. x+=dx;
  16. }
  17. while((2<=x<10)&&(x<x1))
  18. {
  19. y=10*x;
  20. cout.width(3);
  21. cout.precision(5);
  22. cout<<"x="<<x<<"y="<<y<<endl;
  23. x+=dx;
  24. }
  25. while((x>=10)&&(x<x1))
  26. {
  27. y=x/2;
  28. cout.width(3);
  29. cout.precision(5);
  30. cout<<"x="<<x<<"y="<<y<<endl;
  31. x+=dx;
  32. }
  33. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(2,0): error CS1024: Wrong preprocessor directive
prog.cs(3,0): error CS1024: Wrong preprocessor directive
prog.cs(4,0): error CS1024: Wrong preprocessor directive
prog.cs(4,6): error CS1041: Identifier expected, `namespace' is a keyword
prog.cs(4,19): error CS1001: Unexpected symbol `;', expecting identifier
prog.cs(7,0): error CS1041: Identifier expected, `double' is a keyword
prog.cs(7,11): error CS1001: Unexpected symbol `=', expecting identifier
prog.cs(11,10): error CS1001: Unexpected symbol `y', expecting identifier
prog.cs(12,20): error CS1001: Unexpected symbol `(', expecting identifier
prog.cs(13,24): error CS1001: Unexpected symbol `(', expecting identifier
prog.cs(19,10): error CS1001: Unexpected symbol `y', expecting identifier
prog.cs(20,20): error CS1001: Unexpected symbol `(', expecting identifier
prog.cs(21,24): error CS1001: Unexpected symbol `(', expecting identifier
prog.cs(27,10): error CS1001: Unexpected symbol `y', expecting identifier
prog.cs(28,20): error CS1001: Unexpected symbol `(', expecting identifier
prog.cs(29,24): error CS1001: Unexpected symbol `(', expecting identifier
prog.cs(34,1): error CS8025: Parsing error
Compilation failed: 17 error(s), 0 warnings
stdout
Standard output is empty