Write a program to display the spellings of numbers using switch case

//this is a program to display the spellings of numbers
#include<stdio.h>
#include<conio.h>
void main()
{
int num;

printf("\n\nEnter Number form 1 to 10: ");
scanf("%d",&num);

switch(num)
{
case 1: printf("\n\nOne");
break;
case 2: printf("\n\nTwo");
break;
case 3: printf("\n\nThree");
break;
case 4: printf("\n\nFour");
break;
case 5: printf("\n\nFive");
break;
case 6: printf("\n\nSix");
break;
case 7: printf("\n\nSeven");
break;
case 8: printf("\n\nEight");
break;
case 9: printf("\n\nNine");
break;
case 10: printf("\n\nTen");
break;
default: printf("\n\nWrong choice");
break;
}
getch();
}










Previous
Next Post »