Cod sursa(job #551001)
Utilizator | Data | 10 martie 2011 11:01:18 | |
---|---|---|---|
Problema | Text | Scor | 60 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <fstream.h>
#include <string.h>
char s;
long long nc,nt,nr,i,sw;
int main()
{
ifstream fin("text.in");
while(!fin.eof())
{
s=fin.get();
if(s>='a' && s<='z')
{
nc=nr+1;
nt++;
}
else
nr=nc;
}
fin.close();
ofstream fout("text.out");
fout<<nt/nc;
fout.close();
return 0;
}