CASE PROGRAM USING C AND CPP
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a;
cout<<"ENTER A
numbr,I WILL GIVE YOU A MIRACLE!";
cin>>a;
switch(a)
{
case 1:cout<<"U
WILL GET 10 PERCENTAGE COMMISSION";
break;
case 2:cout<<"U
WILL GET 20 PERCENTAGE COMMISSION";
break;
case 3:cout<<"U
WILL GET 30 PERCENTAGE COMMISSION";
break;
case 4:cout<<"U
WILL GET 40 PERCENTAGE COMMISSION";
break;
default:cout<<"\n\nU
NEED TO TYPE 1 OR 2 OR 3 OR 4 OK!";
}
getch();
}
OUTPUT:
ENTER A number,I WILL GIVE YOU A MIRACLE!1
U WILL GET 10 PERCENTAGE COMMISSION
ENTER A number,I WILL GIVE YOU AMIRACLE!2
U WILL GET 20 PERCENTAGE COMMISSION
No comments: