Advertisement
Josif_tepe

Untitled

Mar 22nd, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <stack>
  4. #include <fstream>
  5. #include <algorithm>
  6.  
  7. using namespace std;
  8.  
  9. class Point {
  10. private:
  11.     double x, y, z;
  12. public:
  13.     Point(double _x = 1.0, double _y = 1.0, double _z = 1.0) {
  14.         x = _x;
  15.         y = _y;
  16.         z = _z;
  17.     }
  18.     double get_x() const {
  19.         return x;
  20.     }
  21.     double get_y() const {
  22.         return y;
  23.     }
  24.     double get_z() const {
  25.         return z;
  26.     }
  27. };
  28. int main()
  29. {
  30.     Point p;
  31.     cout << p.get_x() << " " << p.get_y() <<" " << p.get_z() << endl;
  32.     return 0;
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement