write a c program to accept a given integer value and print
its value in words
Answer Posted / sheikh rasel
#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 ? | 17 Yes | 39 No |
Post New Answer View All Answers
How do we declare variables in c?
how to find binary of number?
Describe newline escape sequence with a sample program?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
Differentiate between the expression “++a” and “a++”?
What are types of functions?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Why header files are used?
Why do we write return 0 in c?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Why are all header files not declared in every c program?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Write a program to swap two numbers without using third variable?
Can we change the value of #define in c?
How do you write a program which produces its own source code as output?