Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Computer Programming (Object Oriented Programming)

CSN104
Equivalent Code

Try using Loop


BINARY TO DECIMAL
Equivalent Code

FRACTIONAL DECIMAL TO BINARY


Hexadecimal
 (0-15)
 A-10, B=11, C=12, D=13, E=14, F=15
 One hex digit is equivalent to 4 binary
digits.
Taking hexadecimal value input from user and
displaying it in hexadecimal

hex keyword
Taking hexadecimal value input from user and
displaying it in decimal

If user does not enter correct


value, 0 is printed
Taking Octal value input from user and
displaying it in decimal

oct keyword

If user does not enter correct


value, 0 is printed

You might also like