Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Saturday, January 9, 2010

Write a progam in C (WAPIC) Using switch ............. case

Write a progam in C (WAPIC) Using switch ............. case statement to examine the value of TRY.
print GOOD if TRY has value 10,
print VERY GOOD if TRY has value 15,
print BEST if TRY has value 25,
print BAD if TRY as any other values.



#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int TRY;
printf(" Enter the value of TRY \n");
scanf("%d", &TRY);
switch(TRY)
{
case 10 :
printf("\n GOOD \n");
break;

case 15 :
printf("\n VERY GOOD \n");
break;

case 25 :
printf("\n BEST \n");
break;

default :
printf("\n BAD \n");
}
}

For eg :-

Output :-
Enter the value of TRY
25
BEST

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP