I need some help in that program to read 2 numbers and print sum of them
the program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 100). Followed by the test cases, each test case is described in one line which contains 2 integers separated by a single space X Y (1 ≤ X,Y ≤ 100). X and Y are the 2 numbers which you should print the sum of them.
what's the suitable way to write this code as included

Where are you going to read the two numbers from ?

What programing language will you use ?

I guess you should read on cin and cout stuff. It is a basic input-output way of C++...

Hi @rose_2,

Do you know how to code an "Hello World" type program in C++ ?

If you do, then you can prompt for input.

Then the next thing ... is to code to take in some number ...
and then to take in numbers in a loop and to sum them up.

There are actually many ways to code for this...
but a simple way is demo'd at the following link:

Six Fast Steps to Programming in C++
http://developers-heaven.net/forum/index.php/topic,2019.0.html

But code your own version of a solution for your problem ...
and if you get stuck,
then you will need to show us the code you have tried so far.

Then ... we can see how to help you.

Oh , thanks all i got the answer by myself .. i just missed the mean of test case that i didnt understand the program so well .. it was so simple code
thanks again :))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.