#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <stdarg.h> //#include <conio.h> #include <math.h> #include <string.h> int main() { char s[101]=""; long a,b,c; double x,y; double z; /*if(freopen("input.txt", "rt", stdin)==0) { }*/ /*if(freopen("output.txt", "wt", stdout)==0) { errorMsg("Opened file '%s' is error!\n","output.txt"); }*/ while (gets(s)!=NULL) { if(sscanf(s,"%ld %ld",&a,&b)==2) { z=a+b; printf("%0.0f \n",z); } } return 0; } |
Double click to view unformatted code.