SHARE
TWEET

Untitled

a guest Jul 18th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Random;
  2. import java.util.Scanner;
  3.  
  4. //Author ßarı$
  5.  
  6. class hesaplamalarr{
  7.  
  8.     public static void main(String[] args) {
  9.  
  10.         int boyut;
  11.         int toplam = 0;
  12.         int ortalama = 0;
  13.  
  14.         Random random = new Random();
  15.         Scanner scanner = new Scanner(System.in);
  16.  
  17.         System.out.println("Dizinin boyutunu giriniz: ");
  18.  
  19.         boyut =scanner.nextInt();
  20.  
  21.         int A[] = new int[boyut];
  22.  
  23.         for (int i = 0; i <boyut ; i++) {
  24.  
  25.             System.out.println("Elemanları giriniz: ");
  26.             A[i] =scanner.nextInt(10);
  27.             toplam += A[i];
  28.             System.out.println(i+".eleman: "+A[i]);
  29.  
  30.  
  31.         }
  32.  
  33.         ortalama=toplam/boyut;
  34.         System.out.println("Ortalamanız: "+ortalama);
  35.  
  36.     }
  37.     }
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