Cod sursa(job #2409986)

Utilizator Gabi_IgnatIgnat Gabriel Gabi_Ignat Data 19 aprilie 2019 16:57:18
Problema Text Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.3 kb
#include<bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char ch;
int main()
{int cuv=0,car=0,p=0;
while(f>>noskipws>>ch)
if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
{car++;
if(p==0)
cuv++;
p=1;
}
else
p=0;
g<<car/cuv;
f.close();
g.close();
return 0;
}