(入门题)题目 1586: A+B problem

阅读 42

2022-02-27

题目

Given two integers A and B, your task is to output their sum, A+B.

输入
The input contains of only one line, consisting of two integers A and B. (0 ≤ A,B ≤ 1 000)

输出
The output should contain only one number that is A+B.

样例输入

1 1

样例输出

2

解题思路

直接读入整数后相加。

代码

#include<stdio.h>
int main()
{
    int a,b;
    scanf("%d %d",&a,&b);
    printf("%d",a+b);
    return 0;
}

精彩评论(0)

0 0 举报