Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner; //used to track keystrokes
- import javax.swing.JOptionPane;
- public class Input
- {
- public static void main ( String[] args )
- {
- Scanner keyboard = new Scanner(System.in);
- int intOne;
- int intTwo;
- double d1;
- double d2;
- float f1;
- float f2;
- short s1;
- short s2;
- System.out.print("Enter an integer :: ");
- intOne = keyboard.nextInt();
- System.out.print("Enter an integer :: ");
- intTwo = keyboard.nextInt();
- System.out.print("Eneter a double :: ");
- d1 = keyboard.nextInt();
- System.out.print("Enter a double :: ");
- d2 = keyboard.nextInt();
- System.out.print("Enter a float :: ");
- f1 = keyboard.nextInt();
- System.out.print("Enter a float :: ");
- f2 = keyboard.nextInt();
- System.out.print("Enter a short :: ");
- s1 = keyboard.nextShort();
- System.out.print("Enter a short :: ");
- s2 = keyboard.nextShort();
- System.out.println("Double one = " + d1);
- System.out.println("integer one = " + intOne);
- System.out.println("integer two = " + intTwo);
- System.out.println("Double one = " + d1);
- System.out.println("Double Two = " + d2);
- System.out.println("Float One = " + f1);
- System.out.println("Float Two = " + f2);
- System.out.println("Short One = " + s1);
- System.out.println("Short Two = " + s2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement