Page 559 - Cs_withBlue_J_C11_Flipbook
P. 559
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
557
Sample Projects 557

