Write a program in c to input a 5 digit number and print it
in words.

Answer Posted / sachin patel

#include<stdio.h>
#include<conio.h>
void main()
{
int no;
printf("Enter the no");
scanf("%d",&no);
switch(no)
{
case 1:
printf("One");
break;
case 2:
printf("Two");
break;
case 3:
printf("Three");
break;
case 4:
printf("Four");
break;
case 5:
printf("Five");
break;
case 6:
printf("Six");
break;
case 7:
printf("Seven");
break;
case 8:
printf("Eight");
break;
case 9:
printf("Nine");
break;
default:
printf("You entered Wrong input");
break;
}
}

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15033


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

4830


What is the use of putchar function?

644


what do the 'c' and 'v' in argc and argv stand for?

636


How can you increase the size of a statically allocated array?

606






int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

645


How can I recover the file name given an open stream or file descriptor?

588


Why c language?

636


What is array of pointers to string?

558


What is the easiest sorting method to use?

628


What is the importance of c in your views?

584


What is a list in c?

610


Write a code of a general series where the next element is the sum of last k terms.

582


How to explain the final year project as a fresher please answer with sample project

460


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

1722