SHARE
TWEET

kivkasvol2

a guest Oct 16th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Scanner in = new Scanner(System.in);
  2.         int[] scores=new int[5];
  3.         for(int s=0;s<scores.length;s++) {
  4.             System.out.println("Enter a test score:");
  5.             scores[s]=in.nextInt();
  6.            
  7.         }
  8.         System.out.println("The average is : "+Arrays.stream(scores).average().orElse(Double.NaN));
  9.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top