Car Travel

Introduction

Create an application that calculates and displays the number of kilometers per gallon of gasoline a car gets if it travels 700 kilometers on a 20 gallon tank of gas. The application should display a car graphic. Use the Form_Load event to display “Click button for answer” in lblAnswer, and use the cmdAnswer_Click event to display the answer using a calculation and the Format() function.

Important features:

  • Properly named controls and project
  • Format() function
  • Form_Load event
  • Calculation
  • Commented code
  • Proper indents

Example: