|Finally, I solved my previous problem Re: Sum Multiple Value At a Time - C / C++ / MFC Discussion Boards[^]
I have a question in declaration why we declare sum = 0; if we declare only sum; what happen, what is the meaning of 0 and please clarify the function sum = sum+workhours; I have to understand whole thing.
using namespace std;
int main ()
int sum = 0;
int wage = 0;
cout << "Enter Number of Employee:";
cin >> numemployee;
cout << "Enter Employee Works Hours " << (i+1) <<":";
cin >> workhours;
cout << "Enter Work/hrs Wage " << (i+1) <<":";
cin >> employeewage;
cout << "Total Work Hours: " << sum <<endl;
cout << "Total Wage:" << wage <<endl;
modified 12-Sep-17 8:50am.