Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6. static double sr(int arr[i]){
  7. int a = 0;
  8. int s = 0;
  9. for (int i = 0; i < arr.length; i++) {
  10. if (arr[i] > 990){
  11. a++, s += arr[i];
  12. }
  13. sr = s/a;
  14. }
  15. return sr;
  16. }
  17.  
  18. public static void main(String[] args) {
  19. Scanner in = new Scanner(System.in);
  20. int arr[] = new int [N];
  21. int N = in.nextInt();
  22. for (int i = 0; i < arr.length; i++) {
  23. arr[i] = in.nextInt();
  24. }
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement