i dont know why when i run my code the output numbers come out incorrect example the gross pay comes out as $51562255152.00 can anybody tell me why this is happening and also everything comes out clustered up how can a make them distant and understandable to read
cout<<" Enter employee's LAST name"<<endl;
getline(cin, lastname);
cout<<" Enter employee's FIRST name"<<endl;
getline(cin, firstname);
cout<< "Enter employee's ID Number"<<endl;
getline (cin, empid);
cout<<" Enter the employee's Total Hours worked up to a maximum of 60 hours"<<endl;
cin>> totalHours;
cout<<"Enter the employee's Pay Per Hour"<<endl;
cin>> payPerhour;
On the line regularPay= regularHours*payPerhour; what do you think the value of regularHours is? I see that you declared it int regularHours;, but in between that declaration and where you use the value the first time... You never once give it a value. So what do you think the value is? Your answer should be: "I have no idea." The compiler that makes your program also has absolutely no idea, because in C++ variables should have a value assigned to them before their first use. Hope that helps :)