fork(1) download
  1. #include <iostream>
  2.  
  3. void wypisz()
  4. {
  5. std::cout << 'C';
  6. }
  7. class Czas{
  8. int sek;
  9. void wypisz() const { std::cout << 'c' << sek<<std::endl; }
  10. public:
  11. Czas() :sek(0){ wypisz(); }
  12. Czas(int s) :sek(s){ wypisz(); }
  13. Czas(int m, int s) :sek(m * 60 + s){ wypisz(); }
  14. Czas(int h, int m, int s) :sek(3600 * h + 60 * m + s){ wypisz(); }
  15.  
  16. };
  17.  
  18. int main()
  19. {
  20. Czas t1;
  21. Czas t2;
  22. Czas t3(1, 5);
  23. Czas t4(2, 0, 6);
  24. getchar();
  25. }
Success #stdin #stdout 0s 3100KB
stdin
Standard input is empty
stdout
c0
c0
c65
c7206