Advertisement
Liliiii

Untitled

Sep 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. //THIS IS HOW I STARTED
  2.  
  3. import java.util.Scanner;
  4. public class TestAverage
  5. {
  6.     public static void main(String[] args)
  7. {
  8.     double test1;
  9.     double test2;
  10.     System.out.println("Enter test:");
  11.    
  12.    
  13. }
  14.  
  15. }
  16. //THIS IS THE QUESTION!!
  17.  
  18. //1. Create a program that will have a project and class
  19. //called TestAverage. It will have 2 double variables declared as test1 and test2.
  20. //It will prompt the user to enter in the 2 values for the test1 and test2 as doubles.
  21. //It will output to the console if the 2 tests entered were 100.0 and 96.0
  22. //Test1 100.0
  23. //Test2 96.0
  24. //Sum   196.0
  25. //Avg   98.0
  26. //Max   100.0
  27. //Min   96.0   
  28. //HINT You must use the Math.min and Math.max methods to display the max
  29. //and min of the 2 tests entered.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement