Cod sursa(job #2909205)
Utilizator | Data | 9 iunie 2022 21:15:05 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.58 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("lol.ii");char a[10000];int cv,ch,i;bool st;
int main()
{
while(f>>a)
{ i=0;st=1;
while(a[i]!='\0')
{
if((int(a[i])>64&&int(a[i])<91)||(int(a[i])>96&&int(a[i])<123))
{if(st)
{
st=0;ch++;
cv++;
}
else
ch++;}
else
st=1;i++;
}
}
cout<<ch/cv;
return 0;
}