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

  Purpose: ask the user if he/she would like to enter Scoville
           ratings for peppers, and as long as they answer y,
           prompt them for a Scoville rating and display
           to the screen the minimum audience for a chili
           with that rating
  
  Examples: when this program is run, if the user types y and 250,
            y and 500, y and 1000, and n when prompted, then the
	    following should be printed to the screen between
            the prompts:
the youngest audience for that chili is: infant
the youngest audience for that chili is: toddler
the youngest audience for that chili is: adult

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

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

int main()
{
    int rating;
    char answer;

    // ask the user if he/she wants to enter a rating

    cout << "Would you like to enter a Scoville rating for a chili?"
         << endl << "   (y or n): ";
    cin >> answer;

    while (answer == 'y')
    {
        // get the rating for a chili and show its minimum audience

        cout << "Enter the Scoville rating for a chili: " << endl;
        cin >> rating;

        cout << "the youngest audience for that chili is: " 
             << spiciness(rating) << endl;

        cout << "Would you like to enter another Scoville rating for a chili?"
             << endl << "   (y or n): ";
        cin >> answer;
    }

    return EXIT_SUCCESS;
}