You are on page 1of 1

#include <fstream>

using namespace std;

int main()
{ int n,i,x,nr=0;
ifstream f("date.txt");
ofstream g("date.out");
f>>n;
for(i=1; i<=n; i++)
{
f>>x;
if(x%5==0)
nr++;
}
g<<"sunt:"<<nr<<" nr divizibile cu 5";
f.close();
g.close();
return 0;
}

You might also like