Answer to Question #294534 in C++ for Facewhite

Question #294534

4)Mr Caleb the Hoc of 200 level computer science in Caleb university bought the following goods in one of the warehouse in Lagos where prices of these goods or products are displayed exclusive


*One bag of rice @ 30,000.00 naira


*A 25 litre of groundnut oil @15,000 naira each


*50kg of beef @5,000 naira each


a)Write a C++ program to find the total amount paid by Caleb HOC if VAT was charged @17.5%


b)What is the total Expenditure of HOC is transportation

1
Expert's answer
2022-02-09T02:03:20-0500
#include<iostream>


using namespace std;


int main()
{
	float riceCost=30000;
	float grndntCost=25*15000;
	float beefCost=50*5000;
	float transpCost=4500;
	float VAT=0.175;
	double total = riceCost+grndntCost+beefCost+VAT*(riceCost+grndntCost+beefCost);
	cout<<"The total amount paid by Mr Caleb HOC is "<<total<<" Naira";
	cout<<"\nThe total expenditure of HOC with transportation cost is "<<total+4500<<" Naira";
}

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