Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,c,d,e,f;
- d=0;
- e=0;
- f=0;
- float ter;
- float atfog;
- float beirh;
- float koreirh;
- float kerulet;
- float s;
- cin >> a;
- cin >> b;
- cin >> c;
- if (a>b and a>c)
- {
- d=a;
- }
- else
- {
- if (a>b or a>c)
- {
- e=a;
- }
- else
- {
- if (a<b and a<c)
- {
- f=a;
- }
- }
- }
- if (b>a and b>c)
- {
- d=b;
- }
- else
- {
- if (b>a or b>c)
- {
- e=b;
- }
- else
- {
- if (b<a and b<c)
- {
- f=b;
- }
- }
- }
- if (c>b and c>a)
- {
- d=c;
- }
- else
- {
- if (c>b or c>a)
- {
- e=c;
- }
- else
- {
- if (c<b and c<a)
- {
- f=c;
- }
- }
- }
- cout <<" A=" << a << "\n" <<" B=" << b << "\n" <<" C=" << c << "\n";
- cout << "A legnagyobb: " << d << "\n";
- cout << "A masodik: " << e << "\n";
- cout << "A harmadik: " << f << "\n";
- if (d<(e+f) or e<(d+f) or f<(d+e))
- {
- cout << "Ez egy haromszog!" <<"\n";
- if (e*e+f*f==d*d)
- {
- cout << "Ez egy derekszogu haromszog! " << "\n";
- kerulet=d+e+f;
- cout << "Kerulet: " << kerulet << "\n";
- ter=(e*f)/2;
- cout << "Terulet: " << ter <<"\n";
- atfog=(2*ter)/7;
- cout << "Magassag: " << atfog << "\n";
- s=(d+e+f)/2;
- beirh=ter/s;
- cout << "Beirhato kor sugara: " << beirh << "\n";
- koreirh=d/2;
- cout << "Koreirhato kor sugara: " << koreirh << "\n";
- }
- else cout << " Ez nem egy derekszogu haromszog! " << "\n";
- }
- else
- {
- cout <<" Ez nem lehet egy haromszog!";
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment