decimal to binary & vice versa in c program.pdf code example

Example: decimal to binary & vice versa in c program.pdf

Select conversion:

1. Decimal to binary. 
2. Decimal to octal. 
3. Decimal to hexadecimal. 
4. Exit.

Enter your choice: 1
Enter a number: 7
Result = 111

Select conversion:

1. Decimal to binary. 
2. Decimal to octal. 
3. Decimal to hexadecimal. 
4. Exit.

Enter your choice: 2
Enter a number: 25
Result = 31

Select conversion:

1. Decimal to binary. 
2. Decimal to octal. 
3. Decimal to hexadecimal. 
4. Exit.

Enter your choice: 4
Exiting ...

Tags:

Misc Example