Programming Step 9 (cont.)
{
int pounds; /* number of pounds */
int ounces; /* number of ounces */
float grams; /* number of grams */
pounds = 9; /* first set of data */
ounces = 15;
/* calculate weight in grams */
grams = pounds * 454 + ounces * 28.35;
printf(“The total weight in grams is %f\n”, grams);