/** * Assignment #1, Program 3 * Program to convert pounds to grams or kilograms * Author: Mark Allen Weiss * SSN: 000-00-0000 * Course: COP-2210 Section 8 * Date: September 16, 1998 * * CERTIFICATION OF SOLE AUTHORSHIP * I certify that this work is solely my own and * that none if it is the work of any other person. * I further certify that I have not provided any * assistance to other students enrolled in COP-2210 that * would render their CERTIFICATION OF SOLE AUTHORSHIP * invalid. I understand that violations of this pledge * may result in severe sanctions. * * * * ----------------------------------- * (Mark Allen Weiss) <--- Put your name here, and sign above */ #include int main( ) { // Constants const double KILOGRAMS_PER_POUND = 0.45359237; const int GRAMS_PER_KILOGRAM = 1000; // Input variables double pounds; // Output variables double grams; double kilograms; // Read inputs cout << "Please enter the weight in pounds: "; cin >> pounds; // Compute answers kilograms = KILOGRAMS_PER_POUND * pounds; grams = GRAMS_PER_KILOGRAM * kilograms; // Output results cout << "The weight in grams is " << grams << "." << endl; cout << "The weight in kilograms is " << kilograms << "." << endl; return 0; }