#include <iostream>
using namespace std;
int main() {
int count;
double num;
cout<<"please enter ten numbers ";
count = 10;
while(count<num)
{
cout<<count<<"";
count++;
}
return 0;
}
First get the input from the user. Then compare each value to get the highest/lowest.
Improvable but simple version.
//compile with g++
#include <iostream>
using namespace std;
int main ()
{
int count;
double array[10], max,min;
cout << "please enter ten numbers " << flush;
for(count = 0; count < 10; count++)
cin >> array[count];
max = min = array[0];
for(count = 1; count < 10; count++)
{
if(max < array[count])
max = array[count];
if(min > array[count])
min = array[count];
}
cout << "Greatest was: " << max
<< "\nSmallest was: " << min
<< endl;
return 0;
}