Solution: URI Online Judge 1001 - Extremely Basic

URI Online Judge 1001 - Extremely Basic

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”.


The input file will contain 2 integer numbers.


Print the letter X (uppercase) with a blank space before and after the equal signal followed by the value of X, according to the following example.
Obs.: don't forget the endline after all.


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

    return 0;
No comments

No comments :

Post a Comment