> Online tutorial : switch programs using c
Showing posts with label switch programs using c. Show all posts
Showing posts with label switch programs using c. Show all posts

switch programs using c

**switch programs**
===================

#include<stdio.h>
#include<conio.h>
void main()
{
int a=100;
clrscr();
printf("\n mark1= ");
scanf("%d",&a);
switch(a/10)
{
case 0:
printf(" d class");
break;
case 1:
case 2:
case 3:
printf("c class");
break;
case 4:
case 5:
printf(" b class");
break;
case 6:
case 7:
case 8:
case 9:
case 10:
printf("a class");
break;
}
getch();
}