Cod sursa(job #809368)

Utilizator a96tudorAvram Tudor a96tudor Data 8 noiembrie 2012 10:34:48
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.39 kb
#include <iostream>

#include <fstream>

#include <string.h>

using namespace std;

ifstream fin("text.in");

ofstream fout("text.out");

char a,b;

long int x,y;

int main()

{

b=' ';

while(fin.get(a) )

{

if(((65<=a)&&(a<=90))||((97<=a)&&(a<=122)))x++;

else

{

if(((65<=b)&&(b<=90))||((97<=b)&&(b<=122))) y++;

}

b=a;

}

fout<<x/y;
return 0;

}