Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Design a program that will determine the lowest and the highest of 10 numbers entered by the users in C++

0 votes
asked Feb 5, 2018 by Justin Apilado (440 points)

1 Answer

0 votes
answered Feb 9, 2018 by Nick Guthrie (140 points)
#include <iostream>
using namespace std;

int main()
{
    int max, min, n;
    cin >> n;
    max = n; min = n;
    for (int m(1); m < 10; m++)
    {
        cin >> n;
        if (n > max) { max = n; }
        else if (n < min) { min = n; }
    }
    cout << "Max: " << max << "\nMin: " << min;
    return 0;
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...