Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class sample4
- {
- static Scanner section4 = new Scanner(System.in);
- public static void main(){
- int num1,num2,sum;
- System.out.print("Enter value of first number: ");
- num1 = section4.nextInt();
- System.out.print("Enter value of second number: ");
- num2 = section4.nextInt();
- sum = num1+num2;
- System.out.printf("The sum of %d and %d is %d",num1,num2,sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement