Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. struct CoffeeMachine{
  6.     bool canMakeCappuccino; // can an instance make cappuccino(true) or not (false)
  7.     int price; // Price in roubles
  8.     int pressure; // Pressure of pump
  9.     const char* colour; // Hexadecimal code of colour
  10.     int numberOfCups; // some instances can work with two or even three cups simultaneously
  11. };
  12.  
  13. // Initialization of a coffee machine
  14. void init (CoffeeMachine*, bool canMakeCappuccino=true, int price=5000, int pressure=15, const char* colour = "red", int numberOfCups=1);
  15.  
  16. // make a cup of coffee (espresso)
  17. void makeEspresso(CoffeeMachine*);
  18.  
  19. // Visualization of a coffee machine
  20. void view (CoffeeMachine*);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement