Answer to Question #325799 in C++ for Rille

Question #325799

Make a c++ that will calculate the total expenses and cash left of Miss Carla after spending the following:


Cash-4,050.00


B&W perfume-700.50


B&W lotion-560.85


Dresses-2072.50


Note: the program must display the cash left and total expenses.



1
Expert's answer
2022-04-08T06:08:19-0400
#include <iostream>

using namespace std;

int main()
{
	float cash = 4050;
	float BWParfume = 700.5;
	float BWlotion = 560.85;
	double dresses = 2072.5;
	float expenses = BWParfume + BWlotion + dresses;
	cout << "The total expenses are " << expenses << endl;
	cash -= expenses;
	cout << "The cash left is " << cash << endl;
}

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