Cod sursa(job #402326)
| Utilizator | Data | 23 februarie 2010 19:33:39 | |
|---|---|---|---|
| Problema | Text | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.42 kb |
#include<iostream.h>
#include<string.h>
#include <fstream.h>
int main()
{long int n=0,i,c=0;
ifstream fin("text.in");
ofstream fout("text.out");
int da=0,nu=0,p;
char x[30000];
fin.getline(x,30000);
for(i=0;i<strlen(x);i++) { p=x[i];
if(p>64 && p<91 || p>96 && p<122) {da=1; n++;}
else nu=1;
if (da==1&&nu==1){c++;da=0;nu=0;}}
fout<<(n/c)+1;
fin.close();
fout.close();
return 0;}
