Advertisement
lol1234561

Untitled

Feb 21st, 2023
787
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Main {
  3.     public static void main(String[] args) {
  4. Scanner keyboard = new Scanner(System.in);
  5.  
  6. double num1;
  7. double num2;
  8. double num3;
  9.  
  10.         System.out.println("What is your first number?");
  11.         num1 = keyboard.nextDouble();
  12.         System.out.println("What is your second number?");
  13.         num2 = keyboard.nextDouble();
  14.         System.out.println("What is your third number?");
  15.         num3 = keyboard.nextDouble();
  16.  
  17.         System.out.println( num1 + " + "  +num2 + " + " + num3 + "/2" + " is..." + (num1 + num2 + num3)/2);
  18.  
  19.  
  20.  
  21.  
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement