Variable not Initialized
My compiler is telling me that my variable salary is not initialized, why is that and how can I fix it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
#include <iostream>
using namespace std;
int main()
{
double salary, wage;
cout << "Enter wage: ";
cin >> wage;
salary = wage * 40 * 52;
cout << salary;
}
|
Everything seems to be okay, compiler should not complain. What compiler do you use?
Topic archived. No new replies allowed.