1000: A+B Problem
Time Limit: 1 Sec Memory Limit: 10 MBSubmit: 142 Solved: 112
[ Submit][ Status][ Web Board]
Description
Calculate a+b
![]()
Input
Two integer a,b (0<=a,b<=10)
Output
Output a+b
Sample Input
1 2
Sample Output
3
题目大意
计算a+b
代码
#include<stdio.h>
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
{
printf("%d\n",a+b);
}
return 0;
}
本文介绍了一个简单的A+B问题,该问题是编程入门的基础练习之一。输入包含两个整数A和B,范围限定在0到10之间,输出为两数之和。文章提供了一段使用C语言实现的示例代码,通过scanf读取输入并利用printf输出计算结果。
1243

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



