Find the bugs in this pseudocode and please fix and correctit. start declare var
ID: 3608766 • Letter: F
Question
Find the bugs in this pseudocode and please fix and correctit. start declare variables num gallonsOf GasUsed num milesTraveled num pricePerGallon num milesPerGallon num costPerMile perform inputData ( ) perform computeStatistics ( ) perform displayResults ( ) inputData ( ) input gallonsOfGasUsed input milesTraveled input pricePerGallonOfGas return computeStatistics ( ) milesPerGallon = gallonOfGasUsed / milesTraveled costPerMile = pricePerGallon - milesPerGallon return displayResults ( ) print milesPerGal print costPerMile return stop Find the bugs in this pseudocode and please fix and correctit. start declare variables num gallonsOf GasUsed num milesTraveled num pricePerGallon num milesPerGallon num costPerMile perform inputData ( ) perform computeStatistics ( ) perform displayResults ( ) inputData ( ) input gallonsOfGasUsed input milesTraveled input pricePerGallonOfGas return computeStatistics ( ) milesPerGallon = gallonOfGasUsed / milesTraveled costPerMile = pricePerGallon - milesPerGallon return displayResults ( ) print milesPerGal print costPerMile return stopExplanation / Answer
please rate - thanks
anything in red was changed
start
declare variables
num gallonsOf GasUsed
num milesTraveled
num pricePerGallon
num milesPerGallon
num costPerMile
perform inputData ( )
perform computeStatistics ( )
perform displayResults ( )
inputData ( )
input gallonsOfGasUsed
input milesTraveled
input pricePerGallon
return
computeStatistics ( )
milesPerGallon = gallonsOfGasUsed /milesTraveled
costPerMile = pricePerGallon - milesPerGallon
return
displayResults ( )
print milesPerGallon
print costPerMile
return
stop
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.