Answer to Question #8815 in C++ for alex lee

Question #8815
Write a function calculateItemCost prototyped by

double calculateItemCost(double itemPrice, char discountType, unsigned quantity)
1
Expert's answer
2012-04-26T09:39:40-0400
double calculateItemCost(double itemPrice, char discountType, unsigned quantity)
{
return itemPrice * (1 - (double)discountType / 100.) * quantity;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS