Description
Calculate a+b
Input
Two integer a,b (0<=a,b<=10)
Output
Output a+b
Sample Input
1 2
Sample Output
3
代码
#include<stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a+b);
return 0;
}
本文介绍了一个简单的加法计算器实现方法,使用 C 语言通过输入两个整数 a 和 b 并输出它们的和。该程序利用标准输入输出函数完成计算任务。
Description
Calculate a+b
Input
Two integer a,b (0<=a,b<=10)
Output
Output a+b
Sample Input
1 2
Sample Output
3
#include<stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a+b);
return 0;
}

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