Urgent cin Array with lowest and greatest

Its my first day in class and the teacher isnt here. He wants us to write a program where you enter 20 numbers and then outputs the lowest number and highest number. Any help would be greatly appreciated. Thanks in advance!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  #include <iostream>
#include <iomanip>
using namespace std;

int main()
{
	cout << "This program will tell you the smallest and greatest of any 20 numbers." << endl;
	
	const int NUM_NUMS = 20;			//Number of Numbers
	int num[NUM_NUMS];					//Holds Numbers
	
	//Input the 20 numbers
	cout << "Enter the Numbers.":
	for (int index = 0; index < NUM_NUMS; index++)
	{
		cout << "Number: " << (index+1);
		cin >> num[index];
	}
	//Display the highest number.
	cout << "Here is the highest number: "
	for (int index = 0; index < NUM_NUMS; index++)
	{
		double 
what's the problem?
I have hit a brick wall. I dont know how to get the largest of whatever numbers the user could input nor the smallest.
Topic archived. No new replies allowed.