Please send questions to
st10@humboldt.edu .
/*-----
Contract: main: void -> int
Purpose: ask the user how many Scoville ratings they have,
and then ask for precisely that many, each time printing
to the screen the minimum recommended level that a chili
with that rating should be offered to;
Examples: if, when I run this program, I enter, when prompted,
5, 250, 750, 1250, 500, 1000, then the following
should 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: 04-15-10
-----*/
#include <iostream>
#include "spiciness_level.h"
using namespace std;
int main()
{
int num_ratings;
int latest_rating;
int count = 0;
// ask user how many ratings he/she wants to enter
cout << "How many Scoville ratings would you like to enter? ";
cin >> num_ratings;
// ask for that many Scoville ratings, each time printing out
// the minimum audience recommended for a chili with that
// rating
while (count < num_ratings)
{
cout << "What is the next Scoville rating? ";
cin >> latest_rating;
cout << "the minimum rec'd level is: "
<< spiciness_level(latest_rating) << endl;
count++;
}
return EXIT_SUCCESS;
}