how do you display a position of an user input

I have a program that displays the maximum value of numbers. Now I need to get the position of that input number.

#include <iostream>
using namespace std;


int main ()
{
int count = 0;
int num = 0;
int large_num = 0;

cout<<"Maximum Value of Five Numbers"<<endl;
cout<<"_____________________________"<<endl<<endl;


for (count = 0; count < 5; count = count+1)
{
cout <<endl<<"\tEnter Integers: ";
cin >> num;

if (large_num < num)
{
large_num = num;
}
}
cout<<endl<<"\tLargest number: " << large_num <<endl<<endl<<endl;



}
Last edited on
You can add 1 to a number and set it equal to a place variable and then say the ---- variable was the largest. And kick out that system pause please.
Topic archived. No new replies allowed.