[URI Online Judge] – 1003 – Simple Sum

Read two variables A and B. Next, calculate the sum between them and assign it to the variable SOMA. Write the value of this variable.

Input

The input file will contain 2 integer numbers.

Output

Print SOMA according to the following example, with a blank space before and after the equal signal.

Samples Input Samples Output
30
10
SOMA = 40
-30
10
SOMA = -20
0
0
SOMA = 0

Solution:

#include <cstdio>

int main(){
int a, b;
scanf(“%d”, &a);
scanf(“%d”, &b);
printf(“SOMA = %d\n”, a + b);
return 0;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s