ACM之1000

来源:互联网 发布:程序员入门 编辑:程序博客网 时间:2024/05/29 02:30
Description

计算a加b。

Input

两个整数a和b,其中0≤a, b≤10。

Output

输出a与b的和。

Sample Input: 1 2
Sample Output: 3

#include <iostream>using namespace std;int main(){    int a,b;    cin >> a >> b;  if(a<0||b<0||b>10)cout<<"Two integer a,b (0<=a,b<=10)";else cout << a+b << endl;    return 0;}



0 0
原创粉丝点击