fork download
  1. // Сложение 2 целых чисел
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. int integer1, integer2, sum;
  7.  
  8. cout << "Введите первое целое число\n";
  9. cin >> integer1;
  10.  
  11. cout << "Введите второе целое число\n";
  12. cin >> integer2;
  13.  
  14. sum = integer1 + integer2;
  15. cout << "Сумма равна " << sum << endl;
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:1: error: ‘cout’ was not declared in this scope
prog.cpp:8:1: note: suggested alternative:
In file included from prog.cpp:2:0:
/usr/include/c++/4.7/iostream:62:18: note:   ‘std::cout’
prog.cpp:9:1: error: ‘cin’ was not declared in this scope
prog.cpp:9:1: note: suggested alternative:
In file included from prog.cpp:2:0:
/usr/include/c++/4.7/iostream:61:18: note:   ‘std::cin’
prog.cpp:15:44: error: ‘endl’ was not declared in this scope
prog.cpp:15:44: note: suggested alternative:
In file included from /usr/include/c++/4.7/iostream:40:0,
                 from prog.cpp:2:
/usr/include/c++/4.7/ostream:562:5: note:   ‘std::endl’
stdout
Standard output is empty