Module 4. If (Decision) Statements Exercise Answers

1.
   if (is_pregnant || height < 48)
      cout << "Sorry" << endl;
   else
      cout << "OK: have fun!" << endl;

2.
   max = x;
   if (max < y)
      max = y;
   if (max < z)
      max = z;

3.
   if (honors && awards)
     {
      good_student = TRUE;
     }
   else
     {
      good_student = FALSE;
     }

OR, for a really short way to do this without an if statement
   good_student = honors && awards;

4.
  'c' -- 
   Medium
   Low

  'x' --
   Off the scale

  'D' --
   Low

   
5.
   Cool is all we got