Solution :
//print a word form of given number between 0 to 99 //
#include<stdio.h>
#include<conio.h>
int main()
{
int numb;
scanf("%d", &numb);
if ( numb==10)
printf("Ten");
else
if ( numb==20)
printf("Twenty");
else
if ( numb==30)
printf("Thirty");
else
if ( numb==40)
printf("Fourty");
else
if ( numb==50)
printf("Fifty");
else
if ( numb==60)
printf("Sixty");
else
if ( number==70)
printf("Seventy");
else
if ( number==80)
printf("eighty");
else
if( number==90)
printf("Ninty");
else
printf("others");
getch();
}
Program Analysis :
Its a simple program based on if else if expression,condition and statements.It is done by creating if else if chain and statements don't goes with condition,declared as OTHERS
Post a Comment