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

  Purpose: to ask the user repeatedly IF they want to enter how many
      HIPS they want in cheers, and if so ask for how many and show
      them that many, until they say no --
      and it cheers to the screen as they request

  Examples: if, when called, the user enters n when prompted, the program
      just ends.

      if, when called, the user enters k when prompted, the program
      just ends.

      if, when called, the user enters y, then 3, then y, then 5, then y,
      then 0, then n, when
      prompted, the user should see in response
HIP
HIP
HIP
HOORAY!

HIP
HIP
HIP
HIP
HIP
HOORAY!

HOORAY!

  by: Sharon Tuttle
  last modified: 2016-12-02
--------*/

#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include "cheer.h"
using namespace std;

int main()
{
    cout << boolalpha;

    int num_hips;
    char answer;

    cout << "do you want to enter a number of hips? (y or n): ";
    cin >> answer;

    while (answer == 'y')
    {
        cout << "how many hips? (enter negative to stop): ";
        cin >> num_hips;

        cheer(num_hips);

        cout << "do you want to enter a number of hips? (y or n): ";
        cin >> answer;
    }

    return EXIT_SUCCESS;
}