Cod sursa(job #1346306)

Utilizator tudor_bonifateTudor Bonifate tudor_bonifate Data 18 februarie 2015 10:05:51
Problema Text Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include <iostream>
#include <fstream>
#include <cctype>
using namespace std;
char a[65000];
int i,c;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
    f.getline(a,64999);
    i=0;
    c=0;
    while (a[i]!='\0')
    {
        i++;
        if (isalpha(a[i]) && (!(isalpha(a[i-1])))) c++;
    }
    g<<(i-1)/c;
    return 0;
}