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
What is wrong with this initialization?
What are identifiers in c?
Explain 'bus error'?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
`write a program to display the recomended action depends on a color of trafic light using nested if statments
How can you read a directory in a C program?
What is c language and why we use it?
What is hash table in c?
What is the difference between far and near ?
Can a variable be both static and volatile in c?
What is the mean of function?
What are the types of pointers in c?
What is a macro?
How do I copy files?
What are dangling pointers? How are dangling pointers different from memory leaks?