Page 511 - computer science (868) class 11
P. 511

192                  t = sc.nextInt();
                  193                  if(t==0)

                  194                  {
                  195                      System.out.println("Exit");

                  196                      System.exit(0);
                  197                  }

                  198                  System.out.println("--------------------------------");
                  199              }
                  200          }

                  201      }
                 Output
                 Enter 1 for Decimal to Other
                 Enter 2 for Other to Decimal
                 Enter 3 for Exit
                 1
                 Enter number to convert :
                 60
                 Enter 1 for Binary
                 Enter 2 for Octal
                 Enter 3 for Hexadecimal
                 Enter 4 for Exit
                 1
                 Binary Value of 60 : 111100
                 --------------------------------


                 --------------------------------
                 Do you want more (1 for yes and 0 for no): 1
                 --------------------------------
                 Enter 1 for Decimal to Other
                 Enter 2 for Other to Decimal
                 Enter 3 for Exit
                 2
                 Enter 1 for Binary to Decimal
                 Enter 2 for Octal to Decimal
                 Enter 3 for Hexadecimal to Decimal
                 Enter 4 for Exit
                 2
                 Enter number to convert :
                 52
                 Decimal Value : 42
                 --------------------------------
                 Do you want more (1 for yes and 0 for no): 0
                 Exit





                                                                                                                       509
                                                                                                      Sample Projects  509
   506   507   508   509   510   511   512   513   514   515   516