Tuesday, August 12, 2014

C CODE TO IMPLEMENTS SWITCH CASE PROGRAMM

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("\nENter Any Number : ");
scanf("%d",&n);

switch(n)
{
case 1 : printf("\nONE"); break;
case 2 : printf("\nTWO"); break;
case 3 : printf("\nTHREE"); break;
case 4 : printf("\nFOUR"); break;
case 5 : printf("\nFIVE"); break;
default : printf("\nInvalid");
}
getch();
}

No comments:

Post a Comment

Programmingway@Eklavya Technosys!: Class - 7 A or B | Computer | 100 Questions!

Programmingway@Eklavya Technosys!: Class - 7 A or B | Computer | 100 Questions! :  1) What is digital citizenship? 2) What is a digital citi...