// Chapter 4 - Programming Challenge #6
// Mass and Weight
// This program asks the user to enter an object's mass
// in kilograms. It calculates the object's weight in
// newtons and determines whether the object is too
// heavy, too light, or within the normal range.

#include <iostream>
using namespace std;

int main()
{
    // Variables to store the object's mass and weight
    double mass, weight;

    // Get the object's mass from the user
    cout << "Enter the object's mass in kilograms: ";
    cin >> mass;

    // Calculate the object's weight in newtons
    weight = mass * 9.8;

    // Display the calculated weight
    cout << "The object's weight is " << weight
         << " newtons." << endl;

    // Determine whether the object is too heavy,
    // too light, or within the normal range
    if (weight > 1000)
    {
        cout << "The object is too heavy." << endl;
    }
    else if (weight < 10)
    {
        cout << "The object is too light." << endl;
    }
    else
    {
        cout << "The object's weight is within the normal range." << endl;
    }

    return 0;
}