Cod sursa(job #999119)
| Utilizator | Data | 19 septembrie 2013 12:45:45 | |
|---|---|---|---|
| Problema | Text | Scor | 60 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.63 kb |
#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
using namespace std;
char chars[1024];
int main()
{
int cuv=0;
int size=0;
fstream fin("text.in",ios::in);
fstream fout("text.out",ios::out);
while (fin>>chars)
{
cuv++;
// size+=strlen(chars);
// cout << (char) tolower(chars[0])<<" ";
for (int i=0;i<strlen(chars);i++)
{
// cout << (char) tolower(chars[i]);
if (tolower(chars[i])>=97&&tolower(chars[i])<=122)
{
size++;
}
}
}
fout << size/cuv;
}
