Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- int main ()
- {
- double a,b,c;
- std:: cout<<"Unesite tri realna broja: ";
- std:: cin>>a>>b>>c;
- const double eps(1e-10);
- if (std::fabs(c*c-a*a-b*b)<eps || std::fabs(a*a-b*b-c*c)<eps || std::fabs(b*b-a*a-c*c)<eps)
- std:: cout<<"Uneseni brojevi mogu biti stranice pravouglog trougla.";
- else
- std::cout<<"Uneseni brojevi ne mogu biti stranice pravouglog trougla."<<std:: endl;
- return 0; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement