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 language is c written?
Why pointers are used in c?
What is memory leak in c?
What are the different types of endless loops?
What is a pointer value and address in c?
#include
Where are local variables stored in c?
Why isn't any of this standardized in c? Any real program has to do some of these things.
What is the purpose of macro in C language?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
write a program to create a sparse matrix using dynamic memory allocation.
What are the basic data types associated with c?
How does normalization of huge pointer works?
All technical questions
C program to find all possible outcomes of a dice?