Cod sursa(job #1309336)
Utilizator | Data | 5 ianuarie 2015 17:58:04 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.5 kb |
#include <iostream>
#include <string.h>
#include <fstream>
using namespace std;
int main()
{
ifstream in("text.in");
ofstream out("text.out");
int c=0, d, l=0, n=0, i=1, ok=0;
char s;
while(s!='\n')
{
in.get(s);
if(s>='a' && s<='z' || s>='A' && s<='Z')
{
l++;
ok++;
}
else
{
if(ok!=0)
c++;
ok=0;
}
}
out<<l/c;
return 0;
}