URI 1001 problem solution in C, Java programming language:
Problem Link: https://www.urionlinejudge.com.br/judge/en/problems/view/1001
URI 1001 problem solution in C language:
#include<stdio.h> int main() { int A,B,X; scanf("%d %d", &A, &B); X=A+B; printf("X = %d\n",X); return 0; }
URI 1001 problem solution in Java programming language:
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(); //take input for A B = sc.nextInt(); //take input for B X = A + B; //Basic summation X = A + B System.out.print("X = "+X+"\n"); //Hardly advised to give \n at last } }
URI 1001 problem solution in C++ programming language:
#include <iostream> using namespace std; int main() { int A, B, X; cin >> A >> B; //take input for A and B X = A + B; //Basic summation X = A + B cout << "X = " << X << endl;//Print X in given format and endl is endline or it works linke "\n" in c and java return 0; }
URI 1001 problem solution in Python programming language:
a = input() b = input() X = a + b print "X = %i" % X
URI Online judge problem 1001 simple explanation:
- Just take two variables or take three variables.
- Take input for two variables
- Store the summation of these two variables to third one
- print the third variable result as the above format.
Note:
Since you are reading this, you are a beginner level programmer. So please focus the presentation and format how they wants data from you. Most beginner programmers, get error for presentation and so on.