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
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.
Explain how can I read and write comma-delimited text?
What will the preprocessor do for a program?
Explain logical errors? Compare with syntax errors.
What is meant by 'bit masking'?
What is structure data type in c?
Under what circumstances does a name clash occur?
What is the use of gets and puts?
Why do we use & in c?
What is the difference between the expression “++a” and “a++”?
Differentiate between #include<...> and #include '...'
What is %d called in c?
How many types of sorting are there in c?
Is it cc or c in a letter?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;