Cod sursa(job #1250999)
Utilizator | Data | 28 octombrie 2014 20:45:37 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <fstream>
using namespace std;
ifstream fin ("text.in");
ofstream fout("text.out");
int l=0,c=0,aux=0;
char t;
int main()
{
while(fin.get(t))
{
if((t<='z' && t>=97)||(t<='Z' && t>=65))
{
l++;
aux=1;
}
else
if(aux!=0)
{
c++;
aux=0;
}
}
fout<<l/c;
return 0;
}