class Modul2_2{
public static void main(String[] args){
int bil1[]={10,20,30,40,50};
int bil2[]={60,70,80,10,20};
for(int x=0;x<=4;x++)
{
System.out.print(bil1[x]+" , ");
}
System.out.print("\n");
for(int y=0;y<=4;y++)
{
System.out.print(bil2[y]+" , ");
}
System.out.print("\n");
for(int i=0;i<=4;i++)
{
for(int j=0;j<=4;j++)
{
if(bil1[i]==bil2[j])
{
System.out.print(" "+bil1[i]);
}
}
}
}
}
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar