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


Please Help Members By Posting Answers For Below Questions

What is a spanning Tree?

946


What kind of structure is a house?

549


How is null defined in c?

649


What is main function in c?

544


Can we access array using pointer in c language?

638






Why can arithmetic operations not be performed on void pointers?

583


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1066


What are the different types of pointers used in c language?

610


What is an endless loop?

796


What type is sizeof?

580


How do you write a program which produces its own source code as output?

602


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.

1617


Between macros and functions,which is better to use and why?

1565


Explain the binary height balanced tree?

716


What is preprocessor with example?

578