fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. class day
  8. {
  9. friend class product;
  10. private:
  11. int number;
  12. double bel;
  13. double ygl;
  14. double gur;
  15. double kkal;
  16. public:
  17. friend std::ostream& operator<<(std::ostream& fout, day dy)
  18. {
  19. fout<< dy.number<<std::endl;
  20. return fout<< dy.bel << ' ' <<dy.gur << ' ' <<dy.ygl << ' ' <<dy.kkal<<std::endl;
  21. }
  22. };
  23.  
  24.  
  25. int main(int argc, const char * argv[])
  26. {
  27. day d;
  28. cout << d;
  29. }
  30.  
  31.  
  32.  
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
0
0 0 0 0