Advertisement
Guest User

Untitled

a guest
Jan 19th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. int main()
  2. {
  3. int arr[30], max = 0, submax=0;
  4. for (int i = 0; i != 30 - 1; ++i)
  5. {
  6. if (arr[i] % 2 == 0 && arr[i + 1] % 2 == 0) {
  7. submax++;
  8. if(max<submax)
  9. max = submax;
  10. }
  11. else
  12. submax = 0;
  13. }
  14. printf("max = %d", max);
  15. system("pause>void");
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement