0
i have just trying codeing in HackerRank and there is something wrong
Task Read 3 numbers from stdin and print their sum to stdout. Note: If you plan on completing this challenge in C instead of C++, you'll need to use format specifiers with printf and scanf. Input Format A single line containing 3 space-separated integers:a ,b , and c. Constraints 1<=a,b,c<=1000 Output Format Print the sum of the three numbers on a single line. Sample Input 1 2 7 Sample Output 10 Explanation The sum of the three numbers is . C++ and my code is https://onlinegdb.com/BJJheCr2B
12 Respuestas
+ 3
Try this-
int a,b,c;
cin>>a>>b>>c;
cout<<a+b+c;
+ 2
there is still something wrong
+ 1
done but unfortunately there is something wrong
+ 1
thank U bro i did it , the wrong was in writing cout inter the first number the othere cout and I don't know why
+ 1
Mahmoud Hamed On such coding platforms always remember to code just what you are asked. Do not enter anything extra like you did with your current code. Just give them the numbers they want, that's it.
+ 1
could you tell me some websites like HackerRank to solve problems in but i want it for beginners as i know just a little
+ 1
Avinesh
thank you alot for your help
+ 1
Mahmoud Hamed you're welcome
+ 1
hackerearth and edabit are great places for practice as well.
0
Can you update the link with your new code?
- 1
Why is there return main(); at the end? Kindly make it return 0;