write a c program to accept a given integer value and print
its value in words

Answer Posted / uday

#include<stdio.h>
int main()
{
int n;
clrscr();
printf("\nenter a integer number::");
scanf("%d",&n);
switch(n)
{
case:1
printf("\nOne");
break;
case:2
printf("\nTwo");
break;
case:3
printf("\nThree");
break;
case:4
printf("\nFour");
brak;
case:5
printf("\nFive");
break;
case:6
printf("\nSix");
break;
case:7
printf("\nSeven");
break;
case:8
printf("\nEight");
break;
case:9
printf("\nNine");
break;
default:
printf("\nSorry");
}
getch();
}

Is This Answer Correct ?    19 Yes 41 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the best way to comment out a section of code that contains comments?

726


How to get string length of given string in c?

611


What is a char in c?

559


Why is c known as a mother language?

751


Explain can static variables be declared in a header file?

684






Mention four important string handling functions in c languages .

634


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

718


Why do we use & in c?

596


Explain what is a program flowchart and explain how does it help in writing a program?

653


What is string concatenation in c?

573


Explain zero based addressing.

613


Explain how do you generate random numbers in c?

628


what are the 10 different models of writing an addition program in C language?

1443


What is the use of getchar functions?

683


Why malloc is faster than calloc?

594