Problem :
Simple Sum
Adapted by Neilor Tonin, URI
Brazil
Timelimit: 1
Brazil
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 <stdio.h> int main() { int A , B , SOMA ; scanf("%d %d",&A,&B); SOMA = A + B ; printf("SOMA = %d\n",SOMA); return 0;}
No comments:
Post a Comment