import java.io.*;
class Dictionary
{
public static void main(String[] args)
{
Console console=System.console();
System.out.println("Please enter the next number");
String input;
input=console.readLine();
String[] Hebrew={"ehad", "shnaiim","shalosh","arba","hamesh","shesh","sheva","shmone","tesha","eser"};
String[] English={"one", "two","three","four","five","six","seven","eight","nine","ten"};
for(int x=0;x<Hebrew.length;x++)
{ if(input.equals(Hebrew[x]))
{
System.out.println(English[x]);
}
}
}
{
while(!input.equals("enough") ) //i want to make a condition that if the program doesnt find a number it would do this. but it wont allow me too
{
System.out.println("Illegal word, please enter another word");
input=console.readLine();
}
}
}
NewOrder -1 Posting Whiz
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
NewOrder -1 Posting Whiz
Abdel_eid -5 Junior Poster in Training
NormR1 563 Posting Sage Team Colleague
HarryPad 0 Newbie Poster
mnmw -8 Light Poster
NewOrder -1 Posting Whiz
mnmw -8 Light Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
NewOrder -1 Posting Whiz
NewOrder -1 Posting Whiz
NormR1 563 Posting Sage Team Colleague
NewOrder -1 Posting Whiz
NormR1 563 Posting Sage Team Colleague
mnmw -8 Light Poster
NewOrder -1 Posting Whiz
NormR1 563 Posting Sage Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.