Cod sursa(job #1503019)
| Utilizator | Data | 15 octombrie 2015 14:02:22 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.48 kb |
#include <iostream>
#include <fstream>
using namespace std;
int c,d=1,j,i,n;
char a;
string s;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
i=0;
while((a<65) or (a<97 and a>90) or (a>122))
{f>>a;i++;}
c++;
getline(f,s);
n=s.length();
for(i=0;i<=n-1;i++)
{
if(s[i]==' ' or s[i]=='-') d++;
if ((s[i]>=65 and s[i]<=90) or (s[i]>=97 and s[i]<=122)) c++;
}
cout<<c/d;
return 0;
}
