define a variable sales that has the sales value.
use if else loop
if sales > 10000 then discount(another variable) = (10.0/100)*sales
net = sales - discount
print net
PS: 10.0 to ensure the typecasting thing works correctly
Also check if the question asks for above 10000 or 10000 and above. That will require another condition that is sales>=10000
2006-08-03 23:50:03
·
answer #1
·
answered by williamair1 2
·
0⤊
0⤋
not sure if this is valid for c++ but, something along the lines of
If sales > 9999 then c = sales * .10, or something to that effect.
2006-08-04 06:49:03
·
answer #2
·
answered by chuckufarley2a 6
·
0⤊
0⤋
Take the input from the user and put it through a conditional statement.
2006-08-04 06:49:10
·
answer #3
·
answered by Pinsir003 3
·
0⤊
0⤋
Do u really expect people to help u with that for free? dude, we r here to answer interesting questions. i have hated c++ since the first day it was taken in school. open your eyes buddy, i dont think there r people generous enuf to help u with that.
2006-08-04 06:50:31
·
answer #4
·
answered by Anonymous
·
0⤊
0⤋
most of the above answers will work but if you can't write such a simple programme you should find another job
2006-08-04 07:02:25
·
answer #5
·
answered by rkum123 1
·
0⤊
0⤋
use if statement
if(sales>10000){
90/100*sales;}
2006-08-04 06:50:32
·
answer #6
·
answered by nurul 2
·
0⤊
0⤋
#include
#include
class sales
{
public:
float sale,total;
void sales()
{
cout<<"Enter the total amount of sales";
cin>>sale;
if sale>=10000
total=(100-10)*0.01*sale; /* (or) total=0.9*sale;*/
else
total=sale;
cout<
}
};
void main()
{
sales s;
getch();
}
2006-08-04 08:49:36
·
answer #7
·
answered by india_kakinada 2
·
0⤊
0⤋
you should rephrase your question:
"I have a homework problem that i'm too retarded to do. Can somebody do it for me?"
2006-08-04 14:41:36
·
answer #8
·
answered by Novy 1
·
0⤊
0⤋
Jeez, arkum relax. Maybe he's just learning.
2006-08-04 07:10:10
·
answer #9
·
answered by John R 4
·
0⤊
0⤋