Cod sursa(job #1239099)
Utilizator | Data | 8 octombrie 2014 10:56:36 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <fstream>
using namespace std;
int main()
{
ifstream in("text.in");
ofstream out("text.out");
char c[100];
int cuv=0;
long long nrl=0,nrc=0;
while(in.get(c,2))
{
if(c[0]>='A'&&c[0]<='Z'||c[0]>='a'&&c[0]<='z')
{
nrl++;
if(!cuv)
{
cuv=1;
nrc++;
}
}
else cuv=0;
}
out<<nrl/nrc;
return 0;
}