You are on page 1of 1

CSD 1133 Problem Solving/Program Logic

Assignment #2
Chapter 3: Developing a Program

Instructions: Please use Raptor to complete this lab

Other Instructions will be provided by the instructor

Question 1:
Prompt for and input a saleswoman’s sales for the month (in dollars) and her commission rate (as a
percentage). Output her commission for that month. Note that you will need to convert the
percentage to a decimal. You will need the following variables:
SalesAmount CommissionRate CommissionedEarned
You will need the following formula:
CommissionedEarned = SalesAmount * (CommissionRate/100)

Question 2:
The manager of the Super Supermarket would like to be able to compare the unit price for products
sold there. To do this, the program should input the name and price of an item per pound and its
weights in pounds and ounces. Then it should determine and display the unit price (the price per
ounce) of that item and the total cost of the amount purchased. You will need the following variables:
ItemName PoundPrice Pounds
TotalPrice Ounces UnitPrice

You will need the following formulas:

UnitPrice = PoundPrice/16
TotalPrice = PoundPrice * (Pounds + Ounces/16)

A physicist is willing to develop a code fragment to read a temperature from user in centigrade and
print out the temperature in Fahrenheit. To do this, the program should input the temperature in
centigrade outputs the output in Fahrenheit degrees.
To convert temperatures in degrees Celsius to Fahrenheit, multiply by 1.8 (or 9/5) and add 32.

You might also like