Please send questions to st10@humboldt.edu .

/*-----
  Contract: main: void -> int

  Purpose: ask the user for Scoville ratings and give
           him/her the minimum recommended audience for
	   each, printed to the screen,
	   until he/she answers that he/she is ready to quit
  
  Examples: if, when I run this program, I enter:
            y, 250, y, 750, y, 1250, y, 500, y, 1000, n when prompted, 
            the following would be printed to the screen:
the minimum rec'd level is: infant
the minimum rec'd level is: toddler
the minimum rec'd level is: adult
the minimum rec'd level is: toddler
the minimum rec'd level is: adult

  by: Sharon Tuttle
  last modified: 4-20-10
  -----*/

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

int main()
{
    int sco_rating;
    char answer;

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

    while (answer == 'y')
    {
        cout << "Enter a Scoville rating: ";
        cin >> sco_rating;

        cout << "the rating for that chili is: " 
             << spiciness_level(sco_rating)
             << endl;

        cout << "Do you want to enter another rating? (y or n) " 
             << endl;
        cin >> answer;
    }

    return EXIT_SUCCESS;
}