Please send questions to st10@humboldt.edu .
/*-----
  Signature: main: void -> int

  Purpose: prompts the user for Scoville ratings of chilis,
           and for each it prints to the screen the appopriate
           minimum-age audience for a chili of that spiciness;
           it ends when the user enters a negative Scoville
           rating
  
  Examples: if, when you run this program, you enter, when prompted,
2
30000
250 
500
750
1000
-7
           ...then it will print the following to the screen
              between the prompts:
the minimum-age audience for such a chili is: infant
the minimum-age audience for such a chili is: adult
the minimum-age audience for such a chili is: infant
the minimum-age audience for such a chili is: toddler
the minimum-age audience for such a chili is: toddler
the minimum-age audience for such a chili is: adult

pseudocode:
ask the user for a chili rating

while the rating is >= 0
    determine and print out the minimum audience for that rating

    ask the user for the next chili rating

  by: Sharon Tuttle
  last modified: 11-19-2010
-----*/

#include <iostream>
#include <string>
#include "spiciness.h"
using namespace std;

int main()
{
    int rating;

    // ask the user for a chili rating

    cout << "Enter the Scoville rating for a chili " << endl
         << "   (enter a negative rating to quit): " << endl;
    cin >> rating;

    // show the minimum recommended age audience for each
    //    Scoville rating entered

    while (rating >= 0)
    {
        // determine and print out the minimum audience for that rating

        cout << "the minimum-age audience for such a chili is: "
             << spiciness(rating) << endl;        

        // ask the user for the next chili rating

        cout << "Enter the next Scoville rating for a chili " << endl
             << "   (enter a negative rating to quit): " << endl;
        cin >> rating;
    }

    return EXIT_SUCCESS;
}