2 responses
hi rajesh gupta ..here is the solution for converting number to words
1.get the number from user
2.use the foll formula
if it is 3 digit number then
Example - 256
last digit = number%10 //6
middle digit = (number/10)%10 //5
first digit = (number/10)/10 //2
3.pass these values in switch case
4.print the appropriate words for the number passed in swith case.
1.get the number from user
2.use the foll formula
if it is 3 digit number then
Example - 256
last digit = number%10 //6
middle digit = (number/10)%10 //5
first digit = (number/10)/10 //2
3.pass these values in switch case
4.print the appropriate words for the number passed in swith case.