Pagini recente » Cod sursa (job #1781381) | Cod sursa (job #3199645) | Cod sursa (job #1581695) | Cod sursa (job #1547196) | Cod sursa (job #402324)
Cod sursa(job #402324)
#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,1000);
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;}