ok well ive been trying things and its still not working....this is what its outputting:
Tree Stump Total
Job# Planting Removal Trimming Removal Billed
123 $ 100 $ 0 $ 0 $ 0 $ 100
456 $ 500 $ 0 $ 0 $ 0 $ 500
TOTAL 600
here is the updated code (I olnly added only thing):
Code:
{
cin >> code;
while(code!='Q')
{
if (code == 'P')
{
cin >> num;
cin >> size;
for (int i=1; i <= num; i++);
{
if (size == 'S')
{
total1 = total1 + S;
sum = sum + S;
}
else if (size == 'M')
{
total1 = total2 + M;
sum = sum + M;
}
else if (size == 'L')
{
total1 = total3 + L;
sum = sum + L;
}
}
}
cin >> code;
}
cout << setw(7) << jobnum << "$" << right << setw(7) << total1 << " $" << setw(7) << total2 << " $" << setw(7) << total3 << " $" << setw(7) << total4 << " $" << setw(7)\
<< total1 << endl;
cin >> jobnum;
}
cout << "TOTAL" << setw (54) << sum << endl;
}