Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
JAVA # Dizi Ortalama
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { // Dizi Ort Scanner klavye = new Scanner(System.in); int sayac=0,ortalama=0,toplam=0; int[] dizi = new int[10]; for(int i=0 ; i<dizi.length;i++){ dizi[i]=klavye.nextInt(); toplam=toplam+dizi[i]; sayac++; } ortalama=toplam/sayac; for(int i=0 ; i<dizi.length;i++){ if(dizi[i]>ortalama){ System.out.println("Ortalamadan Yüksek Rakamlar"+dizi[i]); } } System.out.println("Ortalama = "+ortalama); } }
run
|
edit
|
history
|
help
0
Increment Operator
else weird
Item battle rolyal
Add Two Numbers saved in linked lists
Fibonnaci + Prime number combined
continue
ex25
Preference List
inheritance
Coding Challenge - 04 (Perfect numbers)