fork download
  1. #include <cmath>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. long liczba=181063936;
  8. long root=long(sqrt(liczba));
  9. double epsilon = 0.0000001;
  10. bool A=(fabs(liczba-root*root)<epsilon);
  11. bool B=(liczba==root*root);
  12. if(A!=B) cout<<"Owszem jest różnica"<<endl;
  13. else cout<<"MIE MA ŻADNEJ RÓŻNICY!"<<endl;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
MIE MA ŻADNEJ RÓŻNICY!