Cod sursa(job #1131073)

Utilizator alevasluialeHuhurez Marius alevasluiale Data 28 februarie 2014 17:37:56
Problema Text Scor 40
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.53 kb
#include <cstdio>

using namespace std;

int main()
{
    freopen("text.in","r",stdin);
    freopen("text.out","w",stdout);
    unsigned long long total=0,cuvinte=0;
    char x,y;
    while(x!='\n')
    {
        scanf("%c",&x);
        if(x=='\n') break;
        else
        {
            if((x>='A'&&x<='Z')||(x>='a'&&x<='z'))
            {
                total++;

            }
            else if((y>='A'&&y<='Z')||(y>='a'&&y<='z')) cuvinte++;
        }
        y=x;
    }
    printf("%llu",total/cuvinte);
}