Package array43; import java util. Scanner


Download 10.37 Kb.
Sana12.06.2020
Hajmi10.37 Kb.
#118009
Bog'liq
package array43
Tarbiya nazariyasi va metodlari, Tarbiya nazariyasi va metodlari, Abu Lays Samarqandiy. Tanbehul g'ofiliyn, Документ Microsoft Word (2), Искусство в наш, 19-Mashg`ulot Bir o`zgaruvchili Tenglamalar, 004ons3-93-0045-58, Yoshlar siyosati, package array43, qurilish jarayonlari-Model, Классификации ч, Farmbiotex 3-top, 1-оралик назорати (Келдиёров С ), Ma'ruza-1

package array43;

import java.util.Scanner;

public class Array43 {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

int n, soni=0;

System.out.print("n = ");

n = in.nextInt();

int a[]= new int[n];

for(int i = 0; i

System.out.print("a["+i+"] = ");

a[i] = in.nextInt();

}

for(int i = 0; i

for(int j = i+1; j

if(a[i]==a[j]){

soni++;

System.out.println(soni);



}

}

}



System.out.println("har xil qiymat : "+(n-soni));

}

}
Download 10.37 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2022
ma'muriyatiga murojaat qiling