else if ( answer == 'y' || answer == 'Y' )
{
cout << "How many toppings would you like (maximum of 7)?" << endl ;
cin >> i ;
cout << "Please choose from the following list: " << endl ;
cout << "\t1. Extra Pepperoni \t2. Extra Cheese" << endl ;
cout << "\t3. Sausage \t4. Jalapenos" << endl ;
cout << "\t5. Banana Peppers \t6. Green Peppers" << endl ;
cout << "\t7. Mushrooms \t8. M&Ms" << endl ;
cout << "Enter " << i << " topping numbers, followed by the 'Enter' key: " << endl ;
for ( i = 0 ; i < 7 ; i++ )
{
cin >> a[i] ;
}
}
am i doing something wrong here?
I only want to input the specified number into the array but it's making me input data for the entire array before moving on.