SHARE
TWEET

Untitled

a guest Dec 6th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {long long n,c1,c2, t, n2=0, d=1,v[1000],i,p,a,b,ok,ok1,s=0,nri,nrp,u,z,s1,s2,mini=999999,maxi=0,c;
  7. cin>>n;
  8. while(n!=0)
  9. {
  10.     a=1;
  11.     b=1;
  12. while(b<n)
  13. {
  14.     c=a+b;
  15.     a=b;
  16.     b=c;
  17. }
  18. if(b==n)cout<<1<<" ";
  19. else
  20.     cout<<0<<" ";
  21.     cin>>n;
  22. }
  23.  
  24.     return 0;
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top