Cod sursa(job #1152849)

Utilizator bt.panteaPantea Beniamin bt.pantea Data 24 martie 2014 23:57:35
Problema Text Scor 40
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include <fstream>
#include <iostream>
using namespace std;
ifstream f ("text.in");
ofstream g ("text.out");
long long i,k,c,sw;
char s[5],ch;
int main()
{
    while (f.get(s,2))
    {
        if ((s[0]>='A'&&s[0]<='Z')||(s[0]>='a'&&s[0]<='z')) k++;
        else if ((ch>='A'&&ch<='Z')||(ch>='a'&&ch<='z')) c++;
        ch=s[0];
    }
    g<<k/c;
    return 0;
}