Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <locale.h>
- #include <stdio.h>
- int main()
- {
- int arr[30], max=0;
- for (int i = 0; i != 30-1; ++i)
- {
- //if (arr[i]) здесь должна быть проверка на пустоту элемента
- if (arr[i] % 2 == 0 && arr[i + 1] % 2 == 0)
- max++;
- }
- printf("max = %d", max);
- system("pause>void");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement