#include
#include
void CompRetail(int ps3,int wii,int wiir,double&retail1,double&retail2,double&retail3);
void CompEbay(int ps3,int wii,int wiir,double&make, double&make2, double&make3);
void CompProfit(double make, double make2, double make3, double&made, double&spent, double&profit);
int main(){
int ps3, wii, wiir;
double retail1, retail2, retail3, make, make2, make3, made, spent, profit;
randomize();
void ReadData(int&ps3,int&wii,int&wiir);
void CompRetail(int ps3,int wii,int wiir,double&retail1,double&retail2,double&retail3);
void CompEbay(int ps3,int wii,int wiir,double&make, double&make2, double&make3);
void CompProfit(double make, double make2, double make3, double&made, double&spent, double&profit);
return 0;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ReadData(int&ps3,int&wii,int&wiir){
wiir=random(7)+4;
cout<<"Enter the number of PS3's Purch
2006-12-07
00:42:28
·
2 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design
ased: ";
cin>>ps3;
cout<<"Enter the number of Wii's Purchased: ";
cin>>wii;
cout<<"Random number of wiimotes given: "<
}
void CompRetail(int ps3,int wii,int wiir,double&retail1,double&retail2,double&retail3){
retail1=ps3*599.99;
cout<<"Money Spent on PS3's"<
retail2=wii*249.99;
cout<<"Money Spent on Wii's"<
retail3=wiir*19.99;
cout<<"Money Spent on Wiimotes"<
}
void CompEbay(int ps3,int wii,int wiir,double&make, double&make2, double&make3){
make=ps3*2499.99;
cout<<"Money made on PS3's"<
make2=wii*599.99;
cout<<"Money made on Wii's"<
make3=wiir*59.99;
cout<<"Money made on Wiimotes"<
}
2006-12-07
00:43:16 ·
update #1
<
}
void CompProfit(double retail1, double retail2, double retail3, double make, double make2, double make3, double&spent, double&made, double&profit){
cout.setf(ios::left);
cout.precision(2);
spent=(retail1+retail2+retail3);
cout<<"Total money spent: "<
made=(make+make2+make3);
cout<<"Total money made: "<
cout<
profit=made-spent;
cout<<"Total money profited: "<
2006-12-07
00:43:40 ·
update #2