Cod sursa(job #805807)

Utilizator exclamatieDica Florin Sebastian exclamatie Data 1 noiembrie 2012 10:41:26
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.48 kb
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
char a;
int i,j=0,x=1;
int main ()
{
    ifstream wtf("text.in");
    ofstream wtff("text.out");
    while(wtf.get(a))
    for(i=0;i<strlen(a);i++)
    {
        if((65<=a[i])&&(a[i]<=90)) j++;
        if((97<=a[i])&&(a[i]<=122)) j++;
        else
        {
            if((65<=a[i+1])&&(a[i+1]<=90)) x++;
            if((97<=a[i+1])&&(a[i+1]<=122)) x++;
        }
    }
    wtff<<j/x;
}