Hello all, I am trying to write a program that displays the user's input. Then, for it to calculate the input of how many positive and negative integers, the sum of those integers and the average of all integers. The problem is, i cant seem to figure out how to put a limit of up to 20 integers entered and how to display what the user entered in a cout statement.
int array[ SIZE ];
for( int i = 0; i < SIZE; i++ )
{
std::cin >> array[ i ];
}
for( int i = 0; i < SIZE; i++ )
{
std::cout << array[ i ] << std::endl;
}
Actually I would use a do/while loop since you want to input atleast one time ( do ) and you are doing "while" a certian thing has or has not happened ex it does not equal 0 or there are less than 20 entries