I hope that explanation helped. Well here is the code:
Code:
#include <iostream>
#include <string>
using namespace std ;
int main()
{
int list[150] ;
int counter ;
int i ;
bool seventyTwo ;
counter = 0 ;
seventyTwo = true ;
for (i = 0 ; i < 150 ; i++)
{
while(seventyTwo) // While flag seventyTwo is true - loop
{
cout << "Enter an integer: " ;
cin >> list[i] ;
counter++ ; // Increments counter by a value of 1
if (list[i] == 72)
{
seventyTwo = false ; // Terminates loop upon entry of integer 72
}
} // End of while loop (inner)
} // End of outter for loop (outer)
return 0 ;
} // End of main