//                 In-Class Assignment 3
//          if statements and input validation
//
// 1. Save a copy of this program on your disk. Then open the 
//    program in your C++ program editor. 
//
// 2. Run the program and briefly describe what it does.
//
// 3. Try running your program again with an input age of -4.7.
//    Does your input make sense? Does the output make sense?
//
// 4. Modify your program to check for negative ages. If a
//    negative age is entered, your program should print the
//    the age entered and a message with the acceptable range
//    of ages, and end. It should not perform the age
//    conversion or print the converted age. If a good age is
//    entered, it should work the same as before. 
//
// 5. Optional: Try to modify your program so that it checks
//    for both negative ages and ages over 30 years. Change
//    your messages as appropriate.
//
// 6. Turn in a copy of your new program. Be sure your name is on it.
//
//***********************************************************
// Program   : Cat Age Conversion
// Programmer: Your Name
//
// This program calculates the age of a cat on a human scale.
//***********************************************************

#include <iostream.h>
#include <iomanip.h>

const float CAT_TO_HUMAN = 6.5;  // Cat years to human years
                               //    conversion factor

int main()
{
   float catYears;     // cat's age in years
   float humanYears;   // cat's age on human scale

// Set up floating point output format
   cout << setiosflags(ios::fixed) << setprecision(1);

// Get the cat's age in years
   cout << "Enter cat's age in years: ";
   cin  >> catYears;

// Calculate the cat's age on a human scale
   humanYears = CAT_TO_HUMAN * catYears;

// Print the cat's actual age and human age
   cout << "If the cat actual age in years is "
        << catYears << "," << endl;
   cout << "it's age in human years is "
        << humanYears << "." << endl;
   return 0;
}

