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 are the advantages of c preprocessor?
how can use subset in c program and give more example
#include
What is the value of c?
Difference between malloc() and calloc() function?
What is the use of static variable in c?
Explain what are preprocessor directives?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
What is string function in c?
What is a void * in c?
What is ponter?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
explain what are actual arguments?
What is the sizeof () operator?
What is openmp in c?