Wednesday, December 2, 2015

Uri problem 1003 solve

Problem :

Simple Sum

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
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 InputSamples 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