Cod sursa(job #1660143)
Utilizator | Data | 22 martie 2016 20:43:36 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char ch;
int l=0,nrcuv=0,ok=1;
while(f.get(ch))
if(ch>='a'&&ch<='z'||ch>='A'&&ch<='Z'){
l++;
ok=0;
}
else if(ok==0){
nrcuv++;
ok=1;
}
g<< l/nrcuv;
return 0;
}