Advertisement
STANAANDREY

progr

Dec 10th, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a,b,c,rat,ok=1;
  8. cin>>a>>b;
  9. rat=b-a;
  10. do {
  11.  
  12. if (b-a!=rat)
  13.   ok=0;
  14. a=b;
  15. cin>>b;
  16. } while (b!=0);
  17. if (ok)
  18. cout<<"da";
  19. else
  20.     cout<<"nu";
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement