Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //aknan
- //October 22, 2015
- import java.util.Scanner;
- public class InputHW
- {
- public static void main(String[]args)
- {
- Scanner input= new Scanner (System.in);
- System.out.println("What is your name?");
- String name=input.nextLine();
- System.out.println(name+"Pick an integer");
- int a =input.nextInt();
- System.out.print(name+"Pick another integer");
- int b=input.nextInt();
- System.out.println(name+"Pick another integer");
- int c=input.nextInt();
- int sum = a+b+c;
- System.out.println("The sum is"+ sum);
- int difference= a-b-c;
- System.out.println("The difference is"+ difference);
- int product= a*b*c;
- System.out.println("The product is" + product);
- }//Close main
- }//Close class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement