杭电ACM 1000

C++;
#include<iostream>
using namespace std;

int main()
{
   int a,b;
   int sum;
   while(cin>>a>>b&&!cin.fail())
   {
        sum=a+b;
        cout<<sum<<endl;
   }



}


 

 

C:

#include<stdio.h>
int main()
{
	int a,b,s;
	while(scanf("%d%d",&a,&b)!=EOF)
	{
		s=a+b;
		printf("%d\n",s);
	}
}


 

你可能感兴趣的:(编程,C++,c,ACM,杭电)