A+B Problem

PURPOSE

caculate a+b

Standard Input

Two integer a,b

Standard Output

Output a+b

Samples​​​​​​

 

Input Output
1 2

3

2 35 5
5 6 11

Constraints

0≤a,b≤10  
Time Limit 1000 ms
Memory Limit 256 MiB
Output Limit 64 MiB

Analysis

This is a summation problem。Should pay attention to the constraints。

Code

#include 
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    if(a>=0&&b<=10)
    {
        cout<<(a+b);
    }
    return 0;
}

Result

A+B Problem_第1张图片

 

你可能感兴趣的:(A+B Problem)