fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main() {
  5. int x,y,d;
  6. cout<<"unesi broj 1"<<endl;
  7. cout<<"unesi broj 2"<<endl;
  8. cin>>x>>y;
  9. d=x*x-y*y;
  10. if (d>0)cout<<sqrt(d)<<endl;
  11. else if (d==0) cout<<2*x-3*y<<endl;
  12. else cout<<pow(d,4)<<endl;
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5320KB
stdin
2
3
stdout
unesi broj 1
unesi broj 2
625