trying to figure out how to work out
cin.ignore(100,'\n');
cin>>idnum;
while(!cin.eof())
{
cin>>code;
if(code == 'm' || code == 'M')
{
}
if(code == 'h' || code == 'H')
{
cin>>hours;
if(hours<=forty)
{
}
if (hours > forty)
{
}
}
if (code == 'C' || code=='c')
{
}
if(daystotal > 1500.00)
{
}
}
if(code=='P' || code== 'p')
{
cin>>values1>>values;
sum=0;
while(values !=-1)
{
}
}
else
{
cin.ignore(100,'\n');
error++;
cout<<endl;
cout<<error<<" errors were found"<<endl;
}
cin>>idnum;
}
it works but the last part in else doesnt it counts all my data this is my data
98787 h 44 8.98
7433 H 34 89.89
4938 m 384.44
3984 M 456.45
384 P 2.34 4 5 3 77 33 -1
879 p 3.44 4 5 3 2 43 -1
89789 m 849.33
123 A this is a bad data line
15 x 30.0 5 7
my output
ID# CATEGORY Earned
98787 Hourly $ 413.08
1 errors were found
7433 Hourly $ 3056.26
2 errors were found
4938 Manager $ 384.44
3 errors were found
3984 Manager $ 456.45
4 errors were found
384 Piecework $ 285.48
879 Piecework $ 196.08
89789 Manager $ 849.33
5 errors were found
by the way i erase some of the code so nobody will steal it thank you