A+B Problem
Time Limit:1000MS Memory Limit:65536K
Total Submit:62 Accepted:12
Total Submit:62 Accepted:12
Description
Calculate the sum of the two numbers.
Input
Please read input data from Stand Input. Each line of input contains two integer numbers a and b (0<=a,b<=10000). Input is terminated by EOF.
Output
Print data to Stand Output. For each test case output on a single line the sum of a + b.
Sample Input
1 2 4567 12
1 2 4567 12
Sample Output
3 4579
3 4579
Source
SHU
------------------------code--------------------------
#include <stdio.h> void main(){ FILE *fin=stdin; FILE *fout=stdout; long a,b; while(1){ fscanf(fin,"%ld %ld",&a,&b); if (feof(fin)) break; fprintf(fout,"%ld/n",a+b); } }