Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <math.h>
  4. using namespace std;
  5.  
  6. class walcowy;
  7. class kartezjanski
  8. {
  9. private:
  10.     float x, y, z;
  11. public:
  12.     kartezjanski()
  13.     {
  14.         x=1;
  15.         y=1;
  16.         z=1;
  17.     }
  18.     void wyswietlk()
  19.     {
  20.         cout<<"x="<<this->x<<", y="<<this->y<<", z="<<this->z<<endl;
  21.     }
  22.     friend void walcowy:wyswietls(kartezjanski k);
  23. };
  24.  
  25. class walcowy
  26. {
  27. public:
  28.     void wyswietls(kartezjanski k)
  29.     {
  30.         float z, p, fi;
  31.  
  32.         z=k.z;
  33.         p=sqrt((x*x)+(y*y);
  34.         fi=acos(x/p);
  35.  
  36.     }
  37. };
  38.  
  39. int main()
  40. {
  41.  
  42.     return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement