/*----------------------------------------------------------------------*/
/*                          VarConst.cpp                                */
/* Authored By : H.P.Kasmaei                                            */
/* Last Update : february 13, 2009                                      */
/* http://www.hpkclasses.ir/                                            */
/*----------------------------------------------------------------------*/

#include <iostream.h>

/* Define a constant to convert from pounds to grams */
#define GRAMS_PER_POUND 454

/* Define a constant for the start of the next century */
const int NEXT_CENTURY = 2010;

/* Declare the needed variables */
long weight_in_grams, weight_in_pounds;
int year_of_birth, age_in_2010;

main()
{
/* Input data from user */
cout<<"Enter your weight in pounds: ";
cin>>weight_in_pounds;
cout<<"Enter your year of birth: ";
cin>>year_of_birth;

/* Perform conversions */

weight_in_grams = weight_in_pounds * GRAMS_PER_POUND;
age_in_2010 = NEXT_CENTURY - year_of_birth;

/* Display results on the screen */

cout<<"\nYour weight in grams = "<< weight_in_grams;
cout<<"\nIn 2010 you will be "<< age_in_2010 <<" years old\n";

return 0;
}


