grumpy: Tried to do what you said but I didn't succeed. The code in the end I wrote was this:
Code:
#include <iostream>
using namespace std;
int main()
{
int max[2] = {-1000};
int lowest[2] = {1000};
int input[5];
int size = 4;
for (int i = 1; i < size; i++)
{
cout << "Input " << i << ": ";
cin >> input[0];
if (input[0] > max[0])
{
max[0] = input[0];
}
if (input[0] < lowest[0])
{
lowest[0] = input[0];
}
}
cout << "Max is: " << max[0] << '\n';
cout << "Lowest is: " << lowest[0] << '\n';
return 0;
}
I tried to put in some code like this at the end but no one of these worked:
Code:
for (int j = 1; j < size; j++)
//Here is the code that I wrote in the end
{
cout << j << input[j];
}
//or
for (int j = 1; j < size; j++)
{
cout << j << input[size];
}
//or
for (int j = 1; j < size; j++)
{
cout << j << input[0];
}
//or without the "j" before the "input[]"