Hey i'm currently taking a c++ class and had to do a homework assignment where i calculate the miles per gallon with the given miles and gallons used. After I submitted my code to my proff, he said that I forgot to initialize my variables. What does that mean and what is it suppose to look like?
MY CODE:
#include <iostream>
using namespace std;
int main()
{
double miles, gallons, mpg;
char repeat;
do {
cout << "Enter the Number of Miles Traveled: ";
cin >> miles;
cout << "Enter Number of Gallons used: ";
cin >> gallons;
mpg = miles / gallons;
cout << "Your MPG is: " << mpg << endl;
cout << "Would like to repeat(Y/N)?: ";
cin >> repeat;