## Algorithm

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

Simple Algorithm -

1. Take Two input
2. Make sum = input 1 + input 2
3. Print Result

## Code Examples

### #1 Code Example with C Programming

```Code - C Programming```

``````#include <stdio.h>
int main()
{
int A, B, X;
scanf("%d %d", &A, &B);
X = A + B;
printf("X = %d\n", X);
return 0;
}``````
Copy The Code &

Input

cmd
10
9

Output

cmd
X = 19

### #2 Code Example with Java Programming

```Code - Java Programming```

``````import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int A, B, X;
Scanner sc = new Scanner(System.in);
A = sc.nextInt();                     // input for A
B = sc.nextInt();                    // input for  B
X = A + B;                           //Basic summation X = A + B
System.out.print("X = "+X+"\n");    // Advised to give \n at last
}
}``````
Copy The Code &

Input

cmd
-10
4

Output

cmd
X = -6

### #3 Run with PHP Programming Language

```Code - PHP Programming```

``````
<?php
\$input1 = intval(fgets(STDIN));
\$input2 = intval(fgets(STDIN));
\$summation = \$input1 + \$input2;

echo "X = \$summation\n";
?>
``````
Copy The Code &

Input

cmd
40 50

Output

cmd
X = 90

## Demonstration

Problem Details:

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

 Samples Input Samples Output 109 X = 19
 -104 X = -6
 15-7 X = 8