Sunday, February 6, 2022

Sum two numbers Java eclipse

 



public class h1 {


public static void main(String[] args) {

int firstNumber, secondNumber;

java.util.Scanner in = new java.util.Scanner( System.in );

firstNumber = in.nextInt ( );

secondNumber = in.nextInt ( );

System.out.println ( firstNumber + " + " + secondNumber +

" = " + (firstNumber+secondNumber) );

}


}


No comments: