#include<stdio.h>
#include<conio.h>
void main()
{char c;
clrscr();
printf("enter the 1st letter of the colour you want it to b displayed");
scanf(" %c",c);
switch(c)
{case 'r':printf("red");break;
case 'b':printf("blue");break;
case 'g':printf("green");break;
default:printf(" not a primary colour");
}
getch();
}
No comments:
Post a Comment