Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Melinda
- //10.22.15
- //InputHW
- import java.util.Scanner;
- public class InputHW
- {
- public static void main(String[] args)
- {
- Scanner input = new Scanner (System.in);
- System.out.println("Enter your name:: ");
- String name = input.nextLine();
- System.out.println("Please pick one integer");
- int x = input.nextInt();
- System.out.println("Pick another integer");
- int y = input.nextInt();
- System.out.println("Pick one more integer");
- int z = input.nextInt();
- int sum = x + y + z;
- int diff = x - y - z;
- int pro = x * y * z;
- System.out.println(name + " the sum of your 3 integers is " + sum);
- System.out.println(" the difference is " + diff);
- System.out.println(" and the porducct is " + pro);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement