Advertisement
Guest User

Atestat32

a guest
Jan 19th, 2015
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a,b;
  8.  
  9.     cin>>a>>b;
  10.  
  11.     int f1=0,f2=1;
  12.  
  13.     do
  14.     {
  15.         int aux;
  16.         aux=f1;
  17.         f1=f1+f2;
  18.         f2=aux;
  19.     }
  20.     while (f1<a);
  21.  
  22.  
  23.     if(f1==a&&f2==b)
  24.         cout<<"DA";
  25.  
  26.     else cout<<"NU";
  27.  
  28.  
  29.  
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement