Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <math.h>
- using namespace std;
- class Trojkat
- {
- private:
- float x;
- float y;
- float z;
- float obw2;
- public:
- float pole;
- Trojkat(float x, float y, float z) {
- this->x = x;
- this->y = y;
- this->z = z;
- }
- Trojkat()
- {
- x=0;
- y=0;
- z=0;
- };
- Trojkat(const Trojkat &trojkat)
- {
- x=trojkat.x;
- y=trojkat.y;
- z=trojkat.z;
- };
- static bool SprawdzXYZ(float x, float y, float z)
- {
- if(((x&&y&&z>0)&&(x+y>z)&&(z+x>y)&&(z+y>x)))
- return true;
- else return false;
- };
- };
- int main()
- {
- Trojkat *pierwszy = new Trojkat(5,7,9);
- Trojkat drugi (*pierwszy);
- cout << Trojkat::SprawdzXYZ(3,6,8);
- getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment