Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  68c
Language: C/C++
Code:
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
int maxim,a,k=0,a1,a2;
maxim=0;
ifstream Fin;
ofstream Fout;
Fout.open("output.txt");
Fin.open("input.txt");
Fin»a1;
while (!Fin.eof())
if(Fin»a2)
{
if(a1==a2)
k=k+1;
else
{if (maxim<k) maxim=k;
k=1;}
a1=a2;
}
Fout«maxim;
Fout.close();
Fin.close();
return 0;}
Comments: