fork(2) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main(){
  5. int a, b, c;
  6. while(cin>>a>>b>>c){
  7. int a2=pow(a, 2);
  8. int b2=pow(b, 2);
  9. int c2=pow(c, 2);
  10. if(a>b && a>c)
  11. if(a>=(b+c))
  12. cout<<"brak"<<endl;
  13. else{
  14. if((a2+b2)==c2)
  15. cout<<"prostokatny"<<endl;
  16. if((a2+b2)>c2)
  17. cout<<"ostrokatny"<<endl;
  18. if((a2+b2)<c2)
  19. cout<<"rozwartokatny"<<endl;
  20. }
  21. if(b>a && b>c)
  22. if(b>=(a+c))
  23. cout<<"brak"<<endl;
  24. else{
  25. if((a2+b2)==c2)
  26. cout<<"prostokatny"<<endl;
  27. if((a2+b2)>c2)
  28. cout<<"ostrokatny"<<endl;
  29. if((a2+b2)<c2)
  30. cout<<"rozwartokatny"<<endl;
  31. }
  32. if(c>a && c>b)
  33. if(c>=(a+b))
  34. cout<<"brak"<<endl;
  35. else{
  36. if((a2+b2)==c2)
  37. cout<<"prostokatny"<<endl;
  38. if((a2+b2)>c2)
  39. cout<<"ostrokatny"<<endl;
  40. if((a2+b2)<c2)
  41. cout<<"rozwartokatny"<<endl;
  42. }
  43. if(a==b && a==c){
  44. if((a2+b2)==c2)
  45. cout<<"prostokatny"<<endl;
  46. if((a2+b2)>c2)
  47. cout<<"ostrokatny"<<endl;
  48. if((a2+b2)<c2)
  49. cout<<"rozwartokatny"<<endl;
  50. }
  51.  
  52. }
  53. }
  54.  
Success #stdin #stdout 0.01s 5544KB
stdin
Standard input is empty
stdout
Standard output is empty