Write a program in c to input a 5 digit number and print it
in words.
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
#include<stdioi.h>
void main()
{
int n,count=0,a[20];
scanf("%d",&n);
for(i=0;n>0;i++)
{
a[i]=n%10;
n=n/10;
count++;
}
for(i=0;i<count;i++)
{
switch(a[i])
{
case 1:
printf("one");
break;
case 2:
printf("two");
break;
like this print upto case 0 , (ie) after case 9 ... put
case 0.... and finish the switch and close the loop.......
| Is This Answer Correct ? | 119 Yes | 186 No |
write a program in c language to print your bio-data on the screen by using functions.
6 Answers College School Exams Tests, IBM,
What is encapsulation?
Tell about strtok & strstr functions
2 Answers HCL, iFlex, Motorola,
#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā%dā ,a[i]); }
Why Modern OS are interrupt driven?Give an example
How does placing some code lines between the comment symbol help in debugging the code?
What are the 5 types of inheritance in c ++?
being a chemical engineer and with an aggregate of 80% why you opt for TCS and not your core industry?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
What is the scope of static variable in c?
What is bubble sort in c?
void main() { static int i = 5; if(--i) { main(); printf("%d ",i); } } what would be output of the above program and justify your answer? }
5 Answers C DAC, CDAC, Infosys, Wipro,