package javaLearnings;
import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner ob = new Scanner(System.in); int a, b, result; System.out.println("enter the first number = "); a = ob.nextInt(); System.out.println("enter the second number = "); b = ob.nextInt(); result = a+b; System.out.println("the sum of the two numbers is = "+result); } } |