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.
#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;
}
Comments
Leave a comment