Determining Largest, Smallest & Mean from File Input:

Please let me know if I am doing anyting wrong.
Last edited on
   cout << "The number of numbers entered is: ";
    cin >> number;
    cout << "The largest number is: ";
    cin >> largeNumber;
    cout << "The smallest number is: ";
    cin >> smallNumber;

So, you're asking the user to type in how many numbers there are, and what the largest number is, and what the smallest number is? I thought you were supposed to work these out yourself. Why are you asked the user about them?

Nowhere in your code is any logic for actually identifying the smallest and largest number. You're going to have to write some code to actually do that.
Topic archived. No new replies allowed.