Help in c++ plzzzzzzzzzzzz?

i need help in this question (write an c++ code that reads ID numbers of a sequence of salesmen and the amount of sales they made and prints out the ID number ,sales and the commission that each salesmen will get and to print also the highest sale and the number of salesmen making this highest sale.

sale < 50 $ no commission

sale between 50 -100 $ 5% of sale

sale > 100 $ 10% of sale

heeeeeeeeeeeeeeeeeeeelp :(
Start here: http://cplusplus.com/doc/tutorial/

Instead of waiting for someone to do your homework for you, you should probably try to learn the language, then attempt it. Once you have given a valiant attempt, then we'll help guide you in the right direction. Any errors you run across, we'll gladly take a look at them.
look i did it
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream.h>
void main ()
{
	#include <iostream.h>
void main ()
{
	int i,sales,id,com,n;
cout<<"how many salesmen do you have"<<endl;
cin>>n;

for (i=1;i<=n;i++){
	cout<<"Enter ID"<<endl;
	cin>>id;
cout<<"enter employe sales ; enter -1 to end"<<endl;
cin>>sales;
	if (sales<50)
		com=0;
	else if (sales>=50||sales<=100)
		com = sales*0.05;
	else  {
		com=sales*0.1;}
	cout<<"ID =" <<id<<"\tSALES ="<<sales<<"\tCOMMISSION = "<<com<<endl;

}

}


but now i dont know how to do the last part ( print also the highest sale and the number of salesmen making this highest sale.)
Last edited on
Topic archived. No new replies allowed.