Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Melinda
- //10.29.15
- //Find Average
- import java.util.Scanner;
- public class FindAvg
- {
- public static void main(String[] args)
- {
- Scanner input = new Scanner (System.in);
- System.out.println("Please enter a number");
- double num1 = input.nextDouble();
- System.out.println("Please enter another number");
- double num2 = input.nextDouble();
- System.out.println("The average of your two numbers is " + (num1+num2)/2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement