Welcome

>>>Welcome to my "CODE BAZAR"
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others

Update ✔✔✔ Upcoming programming book (.pdf) "Programming Contest (data structures and algorithms) by Md. Mahbub Hasan & "Graph Algorithms" by Safayat Asraf "****** Date: 20 March, 2019****Hazrat Ali****

Saturday, 5 November 2016

URI-1001

URI Online Judge | 1001

Extremely Basic

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Read 2 integer values and store them in 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. Don't present any message beyond what is being specified and don't forget to print the end of line after the result, otherwise you will receive “Presentation Error”.

Input

The input file contain 2 integer values.

Output

Print the variable X according to the following example, with a blank space before and after the equal signal. 'X' is uppercase and you have to print a blank space before and after the '=' signal.
Input SamplesOutput Samples
10
9
X = 19
-10
4
X = -6
15
-7
X = 8


Solution

#include<stdio.h>
int main()
{
    int a,b,result;
    scanf("%d%d",&a,&b);
    result=a+b;
    printf("X = %d\n",result);
    return 0;
}




No comments:

Post a Comment