|
|
вернуться в форумI don't know why mine got problem with the program C++ #include<iostream> using namespace std; int main() { int a,b; cout<<"a" <<endl; cin>>a; cout<<"b" <<endl; cin>>b; cout<<a+b <<endl; system("pause"); } Can you tell me what's the prob????????? the ouput MUST EXACTLY match the specification Re: the ouput MUST EXACTLY match the specification I don't understand what is the meaning of output and input even though i read the website you have told me. Can you briefly tell me about the meaning of output and input and the meaning of these two? I hope I can learn something from you. Re: I don't know why mine got problem with the program C++ Послано windT 26 янв 2009 18:08 This problem haven't say print "a"and"b"letter before input.So I change your programme. #include<iostream> using namespace std; int main() { int a,b; cin>>a; cin>>b; cout<<a+b <<endl; system("pause");//return 0; } Re: I don't know why mine got problem with the program C++ Послано snail 21 ноя 2009 15:00 this can be better: #include<iostream> using namespace std; int main() { int a,b; while(cin>>a>>b) {cout<<a+b<<endl;} return 0; } Edited by author 21.11.2009 15:02 |
|
|