Algorithm
Problem link https://www.codechef.com/problems/FLOW001
Problem
Your task is very simple: given two integers and , write a program to add these two numbers and output the sum.
Input Format
- The first line contains an integer , the total number of test cases.
- Then follow lines, each line contains two integers, and .
Output Format
For each test case, add and and display the sum in a new line.
Constraints
Sample 1:
Input
Output
3 1 2 100 200 10 40
3 300 50
Explanation:
Testcase 1: . Hence the first output is .
Testcase 2: . Hence the second output is .
Code Examples
#1 Code Example with C Programming
Code -
C Programming
#include<stdio.h>
int main()
{
int t,a,b;
scanf("%d",&t);
while(t--)
{
scanf("%d %d",&a,&b);
printf("%d\n",a+b);
}
}
Copy The Code &
Try With Live Editor
Input
3
1 2
100 200
10 40
1 2
100 200
10 40
Output
3
300
50
300
50
Demonstration
Code shape solution FLOW00 Add Two Numbers in C,C++