Advertisement
Guest User

aaaa

a guest
Sep 23rd, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class J07SumAverage
  4. {
  5. public static void main(String[] args )
  6. {
  7. Scanner console = new Scanner(System.in);
  8.  
  9. int num, numbers = 1, inc;
  10. int sum, average, calculation, max, loop, value;
  11.  
  12. System.out.print("Enter Max numbers: ");
  13. max = console.nextInt();
  14. System.out.println();
  15.  
  16. value = 0;
  17.  
  18. for (loop = 1;loop < max + 1;loop++)
  19. {
  20. System.out.print("Enter value " + loop + ": ");
  21. value = console.nextInt();
  22. }
  23.  
  24. } // main
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement