Advertisement
sellmmaahh

z5

Feb 25th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. int main ()
  5. {
  6.     double a,b,c;
  7.     std:: cout<<"Unesite tri realna broja: ";
  8.     std:: cin>>a>>b>>c;
  9.     const double eps(1e-10);
  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)
  11.        std:: cout<<"Uneseni brojevi mogu biti stranice pravouglog trougla.";
  12.        else
  13.         std::cout<<"Uneseni brojevi ne mogu biti stranice pravouglog trougla."<<std:: endl;
  14.         return 0; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement