Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class InputPresentation {
- public static void main(String[] args) {
- /*----------------------------------------------------*/
- System.out.println("Enter an integer: ");
- System.out.println("Enter another integer: ");
- Scanner keyboard = new Scanner (System.in);
- /*----------------------------------------------------*/
- // Variable Declarations
- int first;
- int second;
- double third;
- double fourth;
- /*----------------------------------------------------*/
- // Variable Values
- first = keyboard.nextInt();
- second = keyboard.nextInt();
- third = first * second;
- fourth = (first + second) * third;
- /*----------------------------------------------------*/
- System.out.println("Variable first = " + first);
- System.out.println("Variable second = " + second);
- System.out.println("Variable third = " + third);
- System.out.println("Variable fourth = " + fourth);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement