#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b;
cout<<"Enter the Sale Amount ";
cin>>a;
b=a>25000?25:(a>20000?20:(a>15000?15:(a>10000?10:(a>5000?5:0))));
cout<<"Discount = "<<b<<"%";
getch();
}
#include<conio.h>
void main()
{
clrscr();
int a,b;
cout<<"Enter the Sale Amount ";
cin>>a;
b=a>25000?25:(a>20000?20:(a>15000?15:(a>10000?10:(a>5000?5:0))));
cout<<"Discount = "<<b<<"%";
getch();
}
No comments:
Post a Comment