PROGRAM TO PRINT COLOURS OF RAINBOW ACCORDING TO THE NO. INPUTTED BY THE USER

#include,stdio.h>
#include<conio.h>
void main()
{
int ch;
printf("INPUT A NUMBER\n");
scanf("%d",&ch);

switch(ch)

{
case 6: printf("Red");
break;

case 5 :
printf(" Orange");
break;

case 4 :
printf(" Yellow");

break;
case 3 :
printf(" Green");

break;
case 2 :
printf(" Blue");

break;
case 1 :
printf(" Indigo");

break;

case 0 :
printf(" Violet");

break;
default : ("wrong input ");

}
}


SIMPLE PROGRAMS
FUNCTIONS


NUMBERS


STRINGS AND CHARACTERS

Comments