Please send questions to
st10@humboldt.edu .
/*--------------------------------------------------
created by smtuttle at Tue Oct 19 15:10:27 PDT 2010
--------------------------------------------------*/
#include <iostream>
#include <cmath>
#include "spiciness.h"
using namespace std;
/*--------------------------------------------------
Contract: spiciness : int -> string
Purpose: expects a Scoville rating of some pepper,
and produces a string of the youngest category
of person I should offer a chili with that
rating to
Examples: spiciness(1) == "infant"
spiciness(500) == "toddler"
spiciness(799) == "toddler"
spiciness(1000) == "adult"
spiciness(10000) == "adult"
--------------------------------------------------*/
string spiciness(int sco_rating)
{
if (sco_rating < INFANT_MAX)
{
return "infant";
}
else if (sco_rating < TODDLER_MAX)
{
return "toddler";
}
else
{
return "adult";
}
}