//Isabel Tejeda CSC5 Chapter 4, page 220, #6
//
/*******************************************************************************
*
* DETERMINE AND CATERGORIZE WEIGHT
* _____________________________________________________________________________
* This program will ask for the input of an object's mass in kilograms and
* convert the mass to newtons. It will display the weight it newtons and then
* indicate whether the weight is too heavy or too light.
*
* Computation is based on the formula:
* weight = mass * 9.8
* _____________________________________________________________________________
* INPUT
* mass : The mass of an object in kilograms
*
* OUTPUT
* weight : The weight of an object in newtons
*
******************************************************************************/
#include <iostream>
using namespace std;
int main()
{
float mass; // The mass of an object in kilograms
float weight; // The weight of an object in newtons
//
// Initialize Program Varaibles
cout << "Enter the object's mass in kilograms: "<< endl;
cin >> mass;
//
// Calculate the Weight of the object in newtons
weight = mass * 9.8;
//
// Output Weight
cout << "The object's weight is " << weight << " newtons." << endl;
//
// Determine if the object is too heavy/too light
if (weight > 1000)
cout << "The object's weight is too heavy.";
else if (weight < 10)
cout << "The object's weight is too light.";
else
cout << "The object's weigh is acceptable.";
return 0;
}