In c++
we have the same rule as in the real world, that multiplication is resolved before addition. So you have to put the result of the sum in brackets:
cout<<"20% VAT:"<<((order_of_fries*pricef)
+(order_of_burgers*priceb)
+(order_of_donuts*priced)
+(order_of_ice_cream*pricei)
+(order_of_soft_drinks*prices))*0.20<<endl;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…