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

What language is c written?

658


Why pointers are used in c?

674


What is memory leak in c?

744


What are the different types of endless loops?

728


What is a pointer value and address in c?

729






#include { printf("Hello"); } how compile time affects when we add additional header file .

1521


Where are local variables stored in c?

664


Why isn't any of this standardized in c? Any real program has to do some of these things.

761


What is the purpose of macro in C language?

755


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?

1702


write a program to create a sparse matrix using dynamic memory allocation.

4475


What are the basic data types associated with c?

927


How does normalization of huge pointer works?

744


All technical questions

1612


C program to find all possible outcomes of a dice?

1950