Page 552 - ComputerScience_Class_11
P. 552

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




                  550  Touchpad Computer Science (Ver. 3.0)-XI
   547   548   549   550   551   552   553   554   555   556   557