Advertisement
Guest User

Untitled

a guest
Jan 19th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <locale.h>
  4. #include <stdio.h>
  5. int main()
  6. {
  7. int arr[30], max=0;
  8. for (int i = 0; i != 30-1; ++i)
  9. {
  10. //if (arr[i]) здесь должна быть проверка на пустоту элемента
  11. if (arr[i] % 2 == 0 && arr[i + 1] % 2 == 0)
  12. max++;
  13. }
  14. printf("max = %d", max);
  15. system("pause>void");
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement