Add Two Numbers ||codechef||beginner solution ||programming info


Shivam is the youngest programmer in the world, he is just 12 years old. Shivam is learning programming and today he is writing his first program.

Program is very simple, Given two integers A and B, write a program to add these two numbers.

Input

The first line contains an integer T, the total number of test cases. Then follow T lines, each line contains two Integers A and B.

Output

For each test case, add A and B and display it in a new line.

Constraints

  •  T  1000
  •  A,B  10000

Example

Input
3 
1 2
100 200
10 40

Output
3
300
50
SOLUTION USING C LANGUAGE:-
#include<stdio.h>
int main() {
    int p,a,b,s,i;
    scanf("%d\n",&p);
    for(i=0;i<p;i++)
            {
                scanf("%d %d\n",&a,&b);
                s=a+b;
                printf("%d\n",s);
                s=0;
            }
    return 0;
}
Share:

No comments:

Post a Comment

Translate

Recommended platforms

  1. codechef
  2. hackerrank
  3. codeforces
  4. leetcode
  5. hackerearth

Popular Posts

programming_info. Powered by Blogger.

Blog Archive

Recent Posts

other platforms

  • geeks for geeks
  • w3schools
  • codepen
  • skillshare
  • udemy

Pages

reader support Support