storesimulation.cpp
来自「产生一个随机数」· C++ 代码 · 共 16 行
CPP
16 行
#include<iostream.h>
#include"storeSimulation.h"
storeSimulation::storeSimulation(int chairNumber)
:freeChairs(chairNumber),profits(0),simulation()
{
}
void storeSimulation::order(unsigned int n)
{
double temp=2.5*n;
profits=profits+temp;
}
void storeSimulation:: printProfits()
{
cout<<"\n";
cout<<"This time this store earn "<<profits<<" yuan! A good news!"<<endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?