Solved

Problems - Correcting Logic and Code Errors

Question 55

Essay

Problems - Correcting Logic and Code Errors
The following sample of code contains errors. Rewrite the incorrect statements to correct all errors.
' calculate and return the miles per gallon
Private Function GetMPG(ByVal dblMiles,
   ByVal dblGallons) As Double
Return dblMPG = dblMiles / dblGallons
End Sub
' call the function to calculate miles per gallon
' pass variables for the calculation
intMPG = GetMPG()

Correct Answer:

verifed

Verified

' calculate and return the miles per gal...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents