Time limit1000 msMemory limit32768 kB
total:Memory 1792kB
Calculate A + B .
Input
Each line will contain two integers A and B . Process to end of file.
Output
For each case, output A + B in one line.
Sample Input
1 1
Sample Output
2
问题链接:https://vjudge.net/problem/hdu-1000?tdsourcetag=s_pctim_aiomsg
问题简述:计算a+b
程序说明:a+b的算法
AC通过的C++语言程序如下:
#include <iostream>
using namespace std;
int main()
{
int i,j,sum;
while (cin >> i >> j)
{
sum = i + j;
cout << sum<<endl;
}
}
本文介绍了一个简单的C++程序,用于计算两个整数A和B的和。程序使用标准输入读取A和B的值,然后输出它们的和。这是一个基本的算法题目,适合初学者练习。
2689

被折叠的 条评论
为什么被折叠?



