Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Vektor3d
- {
- double x,y,z;
- public:
- void PostaviX (double x)
- {
- Vektor3d::x=x;
- }
- void PostaviY (double y)
- {
- Vektor3d::y=y;
- }
- void PostaviZ (double z)
- {
- Vektor3d::z=z;
- }
- void Ispisi () const
- {
- std::cout<<"{"<<x<<","<<y<<","<<z<<"}";
- }
- };
- int main ()
- {
- Vektor3d v1;
- v1.PostaviX(5);
- v1.PostaviY(4);
- v1.PostaviZ(3);
- v1.Ispisi ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement