fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int x = 5;
  7. int y = 4;
  8. int z = 9;
  9. int endResult = 0;
  10. endResult = x * y - z
  11. endResult = x + endResult;
  12.  
  13. cout << "This is a string literal" << end1;
  14. cout << "endResult" << end1
  15. cout << endResult;
  16.  
  17. return 0;
  18.  
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:2: error: expected ‘;’ before ‘endResult’
  endResult = x + endResult;
  ^~~~~~~~~
prog.cpp:13:40: error: ‘end1’ was not declared in this scope
  cout << "This is a string literal" << end1;
                                        ^~~~
stdout
Standard output is empty