Advertisement
Kacper-p

sprawdzenie trójkąta

Nov 15th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include<iostream>
  2. #include<conio.h>
  3. #include<cstdlib>
  4. using namespace std;
  5. int a, b, c;
  6. int main()
  7. {
  8. cout<<"Czy trojont jest prostokontny?"<<endl;
  9. cout<<"Podaj bok a: ";
  10. cin>>a;
  11. cout<<"Podaj bok b: ";
  12. cin>>b;
  13. cout<<"Podaj bok c: ";
  14. cin>>c;
  15. if((a*a)+(b*b)==(c*c))
  16. {
  17. cout<<"Boki tworza trojant prostokatny";
  18. }
  19. else
  20. {
  21. cout<<"Boki nie tworza trojkonta";
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement