Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct CoffeeMachine{
- bool canMakeCappuccino; // can an instance make cappuccino(true) or not (false)
- int price; // Price in roubles
- int pressure; // Pressure of pump
- const char* colour; // Hexadecimal code of colour
- int numberOfCups; // some instances can work with two or even three cups simultaneously
- };
- // Initialization of a coffee machine
- void init (CoffeeMachine*, bool canMakeCappuccino=true, int price=5000, int pressure=15, const char* colour = "red", int numberOfCups=1);
- // make a cup of coffee (espresso)
- void makeEspresso(CoffeeMachine*);
- // Visualization of a coffee machine
- void view (CoffeeMachine*);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement