Cod sursa(job #2441067)

Utilizator dimos123Cretu Mihail-Dimosthenis dimos123 Data 19 iulie 2019 20:47:06
Problema Text Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.48 kb
#include <fstream>
#include <cstring>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char ch[99999999999];
int main()
{ int numar=0;
  int i=0;
  int ok=0;
  int j=0;
  f.getline(ch,100000);
  if((ch[j]>='a' && ch[j]<='z') || (ch[j]>='A' && ch[j]<'Z'))
  numar++,ok=1,i=1;
for(j=1;j<strlen(ch);j++)
{
 if ((ch[j]>='a' && ch[j]<='z') || (ch[j]>='A' && ch[j]<'Z'))
  numar++,ok=1;
else
    {if(ok!=0)i++;
    ok=0;}
}
  g<<numar/(i-1);
    return 0;
}