This document contains code to calculate the value of a person's weight in gold. It prompts the user to enter their weight in pounds, converts it to troy ounces using a conversion factor, multiplies it by the price of gold per ounce to get a value, and prints out a message stating their weight in gold is worth that monetary value.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
17 views1 page
Sample 3
This document contains code to calculate the value of a person's weight in gold. It prompts the user to enter their weight in pounds, converts it to troy ounces using a conversion factor, multiplies it by the price of gold per ounce to get a value, and prints out a message stating their weight in gold is worth that monetary value.