import java.util.Scanner;
public class kamus {
public static void main(String [] args){
Scanner Input=new Scanner(System.in);
String [][]kata = {{"ONE","SATU"},{"COW","SAPI"},{"RUN","LARI"},{"RED","MERAH"},{"MAN","ORANG"}};
String katadicari;
System.out.print("kata yang dicari = ");
katadicari = Input.next();
int i,k;
k=-1;
for(i=0;i<5;i++)
{
if (kata[i][0].equals(katadicari.toUpperCase()))
{
k=1;
}
}
if (k==-1)
{
System.out.println("kata yang di cari tidak di temukan");
}
else
{ System.out.println("Terjemahan = 1"+kata[k][1]);
}
}
}
0 komentar:
Posting Komentar