Cod sursa(job #1058559)
| Utilizator | Data | 15 decembrie 2013 17:48:34 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.51 kb |
#include <fstream>
#include <cstring>
using namespace std;
ifstream in ("text.in");
ofstream out ("text.out");
char v[10000001];
int a, l, n;
int main()
{
in.getline(v, 10000000, EOF);
n=strlen(v);
for (int i=0; i<n; ++i)
if (isupper(v[i])||islower(v[i]))
{
a++;
while (isupper(v[i])||islower(v[i]))
{
i++;
l++;
}
}
out<<l/a;
in.close();
out.close();
return 0;
}
