ok, one more question, how can i get a user to input a number, then the program to search for it's index in the array and print the index, and if the number does not exist it will say "number does not exist" ?

#include <algorithm> // for min_element/max_element
#include <iostream> // for cout
using namespace std;
int main()
{
int array[] = {1,12,32,45,56,89,122};
int ivalue;
cout << "please enter the value you are looking for\n";
cin >> ivalue;



cin.get();
cin.get();
return 0;
}