ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1000. A+B Problem

Is there any wrong in my code for this problem
Posted by AKdeBerg 30 May 2014 15:18
#include<iostream>
using namespace std ;
int main()
{
int a, b ;
cout<<"Plz enter two numbers: "<<'\n' ;
cin>> a >> b ;
cout<<"Here is your output: "<< a + b <<'\n' ;
return 0 ;
}

what's the wrong!!! I've written this code in c++ and submitted under visual c++2010 but they don't accept it..why?????
Re: Is there any wrong in my code for this problem
Posted by [RISE] Levon Oganesyan [RAU] 30 May 2014 23:39
Because you write some text in output.
Remove all text.
#include<iostream>
using namespace std ;
int main()
{
int a, b ;
cin>> a >> b ;
cout<< a + b ;
return 0 ;
}
Like this
Re: Is there any wrong in my code for this problem
Posted by AKdeBerg 1 Jun 2014 01:27
thanks for your answer :)
Re: Is there any wrong in my code for this problem
Posted by [RISE] Levon Oganesyan [RAU] 1 Jun 2014 02:02
=))