program that accepts amount in figures and print that in
words

Answer Posted / shilpa

int num, temp,lastnumber[100];

num=12345;
temp=num;
for(int i=1;temp==0;i++)
temp=temp/10; //to check how many digits are there
// even if zero is included in it like 10004
// so number of digits is equal to i;
temp=num;
for(int j=1;i==j;j++)
{
num=num/10; // since num is integer it will exculde the decimal
num=num*10; // exclude number will be replaced by zero
lastnumber[j]=temp-num;
temp=num;
}

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

1580


Explain how can I read and write comma-delimited text?

663


What will the preprocessor do for a program?

596


Explain logical errors? Compare with syntax errors.

633


What is meant by 'bit masking'?

893






What is structure data type in c?

575


Under what circumstances does a name clash occur?

702


What is the use of gets and puts?

610


Why do we use & in c?

597


What is the difference between the expression “++a” and “a++”?

656


Differentiate between #include<...> and #include '...'

623


What is %d called in c?

765


How many types of sorting are there in c?

620


Is it cc or c in a letter?

576


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1896