Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- int arr[30], max = 0, submax=0;
- for (int i = 0; i != 30 - 1; ++i)
- {
- if (arr[i] % 2 == 0 && arr[i + 1] % 2 == 0) {
- submax++;
- if(max<submax)
- max = submax;
- }
- else
- submax = 0;
- }
- printf("max = %d", max);
- system("pause>void");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement