Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cstdlib>
  4.  
  5. using namespace std;
  6. int main()
  7. {
  8. int a=0,b=0,k=1,maxi;
  9. do
  10. {
  11. cout<<"Podaj a:"<<endl;
  12. cin>>a;
  13. if(a==b)
  14. {
  15. k++;
  16. b=a;
  17. }
  18. if(a!=b)
  19. {
  20. k=1;
  21. b=a;
  22. }
  23. }
  24. while(k<3);
  25. cout<<"elko"<<endl;
  26.  
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement