What am I doing wrong!!

This is the problem
A car dealership has 10 salespeople. The dealership keeps track of the number of cars sold by each salesperson each month and reports it to management. The management then takes that data and assigns a number 1 – 10 to each salesperson. The following statement declares an array to store the number of cars sold by each salesperson:
int cars[10];
Write a program to save the number of cars sold by each salesperson in the array named cars. Output 1) the total number of cars sold at the entire dealership, 2) which salesperson sold the most cars (Salesperson #1, Salesperson #2, etc.), and 3) how many cars that best salesperson sold.


This is my program when I load it the "enter cout" does not display on screen







#include<iostream>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <fstream>
using namespace std;


int totalsold (int myarray[])

{
int total=myarray[0];
for(int i=0; i>10; i++)
{
total=total+ myarray[i];
}
return total;
}


int LargestSale (int Myarray[])
{
int biggest=0;
for(int i=0; i>10; i++)
{
if(Myarray[i]>biggest)
{
biggest=Myarray[i];

}
}
return biggest;

}
int main()
{
int cars[10];

cout<<"Welcome user!\n"<<endl;

for (int i=0; i>10; i++)
{
cout<< "\nEnter the number of cars sold by salesperson"<< i+1<< "each month: "<<endl ;
cin>> cars[i];
}
cout<< "Total sold:"<<totalsold(cars)<<endl;
cout << "The salesperson who sold the most was: "<< LargestSale(cars)<<endl;
}



try

for (int i=0; i<10; i++)
Topic archived. No new replies allowed.