C++ Code Example: largest number in an array

This program outputs the largest number from an array.

#include <iostream>
using namespace std;

int main () {
    int quantity, i;
    int numbers[20];

    cout << "How many numbers do you want to store in array? (1 - 20) " << endl;
    cin >> quantity;

    // Store numbers in array (user input)
    for(i = 0 ; i < quantity ; i++) {
        cout << "Please enter a number: " << endl;
        cin >> numbers[i];
    }
    
    int currentNumber = numbers[0];

    // loop over array and store largest number in first array position
    for(int i = 1; i < quantity; i++) {
        if(currentNumber < numbers[i]) {
            currentNumber = numbers[i];
        }
    }

    cout << "Largest number in array is: " << currentNumber << endl;
}
Output
How many numbers do you want to store in array? (1 - 20) 
5
Please enter a number: 
44
Please enter a number: 
77
Please enter a number: 
22
Please enter a number: 
99
Please enter a number: 
53
Largest number in array is: 99