Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- int n,h=0, hmax=0;
- ifstream fin("be.txt");
- while(!fin.eof())
- {
- fin>>n;
- if(n%2==0)
- h++;
- else
- {
- if(h>hmax)
- hmax=h;
- h=0;
- }
- }
- if(h>hmax)
- hmax=h;
- fin.close();
- ofstream fout("ki.txt");
- fout<<hmax;
- fout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement