Sunday, 15 December 2013

Print in lojban

public class Lojban {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        // TODO code application logic here
       String[] lojban={"no","pa","re","ci","vo","mk","xa","ze","bi","so"};
       System.out.println("Enter a lojban number not less than or equal to 1,000,000");
       BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
       String lojan=br.readLine();
       int num;
       String number;
     
       for(int i=0;i<lojan.length();i=i+2){
           number=lojan.substring(i, i+2);
          // System.out.println(number);
           for(int j=0;j<lojban.length;j++) {
               if(lojban[j].equals(number))
               {
                   System.out.println(j);
               }
           }
       }
    }
}

No comments:

Post a Comment