Programming Essay

251 Words2 Pages
Program Description: This program will calculate the sum of 5 video games (floats). The program will ask the user for the price of 5 video games. If the sum of the prices is greater than $250.00, then a message will print stating “Try taking a look at our pre-owned selection.” This design step will include both pseudocode and flow chart. Pseudocode: // This program will calculate the price 5 video games. // Declare variables Declare count as integer Declare Game_Price, Price_Total as float //Initialize Counter, Price_Total to 0 Set count = 0 Set Price_Total = 0 // Loop through 5 floats While count < 5 Print “Please, enter price of video game.” Price_Total = Price_Total + Game_Price count = count+1 End While //Print results and messages Print “Total Price is” + Price_Total If (Price_Total > 250.00) Printf “Try taking a look at our pre-owned selection.” End if Declare count as integer Declare count as integer Start Start Declare Game_Cost, Price_Total as floats Declare Game_Cost, Price_Total as floats Set count=0 Set Price_Total=0 Set count=0 Set Price_Total=0 count<5 count<5 Print Price_Total Print Price_Total NO NO End End Sum>250.00 Sum>250.00 YES YES Print “Try taking a look at our pre-owned selection.” Print “Try taking a look at our pre-owned selection.” count=count+1 count=count+1 Price_Total=Price_Total + Game_Cost Price_Total=Price_Total + Game_Cost Input Game_Cost Input Game_Cost Print “Please, enter price of video game.” Print “Please, enter price of video game.” No

More about Programming Essay

Open Document