Advertisement
STANAANDREY

PBb

Nov 28th, 2018
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5.  
  6. int main(){
  7.  
  8. long  a,b,c;
  9. float mg;
  10. cin>>a>>b;
  11. c=b;
  12. while (a!=0&&b!=0&&c!=0)
  13. {
  14.  cin>>c;
  15.   mg=sqrt(a*b);
  16.   if (mg==c)
  17.         cout<<a<<" "<<b<<" "<<c;
  18.    a=b;
  19.    b=c;
  20. }
  21.    return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement