|
|
вернуться в форумWhat's wrong with it? Послано Me 3 июл 2014 22:03 #include <iostream> using namespace std; void main() { int a, b; cin >> a >> b;
cout << "The sum is: " << output << endl; } Re: What's wrong with it? 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 Re: What's wrong with it? 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: ". |
|
|