0% 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.

Uploaded by

api-3766852
Copyright
© Attribution Non-Commercial (BY-NC)
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% 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.

Uploaded by

api-3766852
Copyright
© Attribution Non-Commercial (BY-NC)
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
You are on page 1/ 1

Sample 3

Entering and printing data


poundtotroy=14.5833

goldprice=350

PRINT"Are you worth your weight in gold"

PRINT"Please enter your weight in pounds and we shall see"

INPUT weight

value =goldprice*weight*poundtotroy

LOCATE 10,25

PRINT"Your weight in gold is worth £";

PRINT USING "######.##";value

END

You might also like