URI Online Judge | 1001 Extremely Basic (Solution)

Problem Link:
https://www.urionlinejudge.com.br/judge/en/problems/view/1001

URI Online Judge | 1001

Extremely Basic

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Read 2 variables, named A and B and make the sum of these two variables, assigning its result to the variable X. Print X as shown below. Print endline after the result otherwise you will get “Presentation Error”.

Input

The input file will contain 2 integer numbers.

Output

Print X according to the following example, with a blank space before and after the equal signal.
Sample InputsSample Outputs
10
9
X = 19
-10
4
X = -6
15
-7
X = 8
Solution:
#include<stdio.h>
int main(){
int a,b,x;
scanf("%d %d",&a,&b);
x=a+b;
printf("X = %d\n",x);
return 0;
}

Comments

Popular posts from this blog

URI Online Judge | 1036 Bhaskara's Formula (Solution)

URI Online Judge | 1043 Triangle (Solution)

URI Online Judge | 1042 Simple Sort (Solution)