Cod sursa(job #1505449)
| Utilizator | Data | 19 octombrie 2015 10:41:48 | |
|---|---|---|---|
| Problema | Text | Scor | 30 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
char c[100];
fin.get(c,100);
int l=0, cuv=0;
for(int i=0; c[i];i++)
if(strchr(" -,", c[i]))
cuv++;
else
if(strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", c[i]))
l++;
int media;
media=l/cuv;
fout<<media;
return 0;
}
