The New Wave Computer Company sells its product, the NW-PC for $675. In addition, they sell memory expansion cards for $69.95, disk drives for $198.50, and software for $34.98 each. Given the number of memory cards, disk drives, and software packages desired by a customer purchasing a NW-PC, print out a bill of sale that appears as follows:
**********************************************
NEW WAVE COMPUTERS
ITEM cost
1 NW-PC $675.00
2 MEMORY CARD $139.90
1 DISK DRIVE $198.50
4 SOFTWARE $139.92
-----------
TOTAL $1153.32
This is what I have so far but how do I promp the computer to show the cin inut value of each item like the ones on the left (1,2,1,4 etc)...I say my program is roughly 90% complete but im stuck on the last little bit. I also dont understand why the code text is not showing up in the different colors that its supposed to (red, orange, green etc) for simplicity purposes. I copied and pasted this from the main.cpp file from off of Xcode. sorry for the inconvenience and thnx for the response
#include <iostream>
#include <cmath>
#include <fstream>
#include <iomanip>
using namespace std;
const float NW_PC = 675;
const float MEMORY_CARD = 139.90;
const float DISC_DRIVE = 198.50;
const float SOFTWARE = 139.92;
int main ()
{
double PC;
double mem_CARD;
double disc_DRIVE;
double soft_WARE;
double bill_TOTAL;
//double input;
cout << setw(5)<<fixed<<showpoint;
cout <<"Enter the number of PC needed :" <<endl;
cin >> PC;
cout <<"Enter the number of Memory Card needed :" <<endl;
cin >> mem_CARD;
cout <<"Enter the number of Disc Drive needed :" <<endl;
cin >> disc_DRIVE;
cout <<"Enter the number of Software needed :" <<endl;
cin >> soft_WARE;
bill_TOTAL = ((PC*NW_PC) + (mem_CARD + MEMORY_CARD) + (disc_DRIVE + DISC_DRIVE) + (soft_WARE + SOFTWARE));
cout << bill_TOTAL;
cin.get();
return 0;
}
mbasit 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.