Cod sursa(job #1378783)
Utilizator | Data | 6 martie 2015 14:18:15 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
int i,x=0,c=0,ok=0; char s[10000];
f.get(s,10000);f.get();
for(i=0;i<=strlen(s);i++)
{
if((s[i]>='A' and s[i]<='Z')or (s[i]>='a' and s[i]<='z'))
{
x++;ok=1;
}
else if(ok==1)
c++,ok=0;
}
cout<<x/c;
return 0;
}