Write a program to print the given number in words using ladder if.
/* Write a program to print the given number in words using ladder if.*/
#include <stdio.h>
void main()
{
int n;
printf("Enter
the number : ");
scanf("%d",&n);
if(n==1)
{
printf("One\n");
}
else if(n==2)
{
printf("Two\n");
}
else if(n==3)
{
printf("Three\n");
}
else
{
printf("Outside Range\n");
}
getch();
}
Comments
Post a Comment