fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. int value1()
  4. {
  5. int value;
  6. cin>>value;
  7. return value;
  8. }
  9. int oparetion()
  10. {
  11. int op;
  12. cin>>op;
  13. return op;
  14. }
  15. int reasult(int op,y,x)
  16. {
  17. if(op=1)
  18. return x+y;
  19. ie(op=2)
  20. return x-y;
  21. if(op=3)
  22. return x*y;
  23. if(op=4)
  24. return x/y;
  25. return -1;
  26. }
  27. Void Printreasult(int reasult)
  28. {
  29. cout<<"reasult is "<<reasult<<endl;
  30. }
  31.  
  32. int main() {
  33. // your code goes here
  34. int 2=value1();
  35. op=oparetion();
  36. int 6=value1();
  37. reasult1(5,2,4);
  38. int reasult
  39. return 0;
  40. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:15:20: error: ‘y’ has not been declared
 int reasult(int op,y,x)
                    ^
prog.cpp:15:22: error: ‘x’ has not been declared
 int reasult(int op,y,x)
                      ^
prog.cpp: In function ‘int reasult(int, int, int)’:
prog.cpp:18:8: error: ‘x’ was not declared in this scope
 return x+y;
        ^
prog.cpp:18:10: error: ‘y’ was not declared in this scope
 return x+y;
          ^
prog.cpp:19:8: error: ‘ie’ was not declared in this scope
 ie(op=2)
        ^
prog.cpp:22:8: error: ‘x’ was not declared in this scope
 return x*y;
        ^
prog.cpp:22:10: error: ‘y’ was not declared in this scope
 return x*y;
          ^
prog.cpp:24:8: error: ‘x’ was not declared in this scope
 return x/y;
        ^
prog.cpp:24:10: error: ‘y’ was not declared in this scope
 return x/y;
          ^
prog.cpp: At global scope:
prog.cpp:27:1: error: ‘Void’ does not name a type
 Void Printreasult(int reasult)
 ^~~~
prog.cpp: In function ‘int main()’:
prog.cpp:34:5: error: expected unqualified-id before numeric constant
 int 2=value1();
     ^
prog.cpp:35:1: error: ‘op’ was not declared in this scope
 op=oparetion();
 ^~
prog.cpp:36:5: error: expected unqualified-id before numeric constant
 int 6=value1();
     ^
prog.cpp:37:15: error: ‘reasult1’ was not declared in this scope
 reasult1(5,2,4);
               ^
prog.cpp:39:1: error: expected initializer before ‘return’
 return 0;
 ^~~~~~
stdout
Standard output is empty