chris trimble unit7 lab
TRANSCRIPT
Chris trimble
Chris trimble Unit 7 Lab
7.1 - Step 1
Module main () //Declare local variables Declare String clientName = Declare Real feetUTP = 0 Declare Real subTotal = 0 Declare Real taxCost = 0 Declare Real totalCost = 0 //Module calls Call inputData(feetUTP, clientName) Call calcCosts(feetUTP, subTotal, taxCost, totalCost) Call displayBill(clientName, totalCost) End Module
Step 2
Module main () Declare String keepGoing = yWhile keepGoing == y //Declare local variables Declare String clientName = Declare Real feetUTP = 0 Declare Real subTotal = 0 Declare Real taxCost = 0 Declare Real totalCost = 0 //Module calls Call inputData(feetUTP, clientName) Call calcCosts(feetUTP, subTotal, taxCost, totalCost) Call displayBill(clientName, totalCost)
Display Do you want to do this again?Display (Enter y for yes)Input keepGoing End WhileEnd Module7.2
7.3
//Declare loop control variable Declare Integer counter = 0Declare Integer toPower = 2Declare number = 2While counter