|
|
back to board#include <iostream> using namespace std; void main() { int a, b; cin >> a >> b;
cout << "The sum is: " << output << endl; } You didn't declare output: #include <iostream> int main() { int a, b; std::cout << "Enter first number: "; std::cin >> a; std::cout << "Enter second number: "; std::cin >> b; int output = a + b; std::cout << "\nThe sum is: " << output << std::endl; return 0; } Edited by author 25.07.2014 23:23 Your program must read and print only the data that is required in the problem statement. For example, you musn't print "Enter first number: " or "The sum is: ". |
|
|