Guest User

Untitled

a guest
Mar 29th, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class Pookan
  2. {
  3. public:
  4. enum Error
  5. {
  6. NoError = 0,
  7. HeatError,
  8. ExplosionError
  9. };
  10. private:
  11. int mx;
  12. public:
  13. explicit Pookan(int x) : mx(x) {}
  14. Error error() const
  15. {
  16. if (mx <= 37)
  17. return NoError;
  18. else if (mx < 9000)
  19. return HeatError;
  20. else
  21. return ExplosionError;
  22. }
  23. };
Advertisement
Add Comment
Please, Sign In to add comment