Advertisement
MOHD_NASIR_UDDIN42

user input & show summation

May 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1.  
  2. package hello;
  3. import java.util.Scanner;
  4.  
  5. public class NewClass {
  6.    
  7.     public static void main(String[] args){
  8.         int a,b,sum;
  9.         Scanner scan=new Scanner(System.in);
  10.         a=scan.nextInt();
  11.         b=scan.nextInt();
  12.         sum=a+b;
  13.         System.out.println(a+" "+b+"="+sum);
  14.        
  15.     }
  16.    
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement