int ID(int sales)
{
int cars[10];
int max = cars[0];
for (int i = 1; i < 10 ; i++)
{
if (cars[i] > max)
max = cars[i];
// i want to print the i as the salesmen ID
}
return sales;
}
is it somehow to do with the jump statement?
thanks for whoever can lend a hand...if this question cannot settle, i'll just pass up this assignment with this criteria not fulfil...
更新1:
the question was having an array of numbers, which represents the number of car sold by individual salesman with the ID 0-9
更新2:
i am using c++ as coding, and the salesman ID is written in user defined function...