Question Day 3

1. Write a program to count the no of digits in an integer. N=123, answer=3

2. Write a program to sum the of digits in an integer. N=123, answer=6

3. Write a program to read 5 digits and convert to a single integer.Eg 1,2,3,2,4=12324.

4. Write a program to convert decimal numbers to octal and from octal to binary.

5. Write a program to convert decimal to bcd.

6. Write a program to convert a decimal fraction to a binary fraction .Eg 0.62510 to 0.101=1*2-1 + 0*2-2 + 1*2-2 


Contact us for software training, education or development










 

Post a Comment

0 Comments

Me