Cod sursa(job #1526807)

Utilizator tqmiSzasz Tamas tqmi Data 17 noiembrie 2015 12:56:28
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
char a;
int cuv=0,lungcuv=0,cuvint;
while(fin.get(a))
{
    if ((a>='A' && a<='Z') ||( a>='a' && a<='z'))
    {
        lungcuv++;
        cuvint=1;
    }
    else
    {
        if(cuvint)
        {
            cuv++;
            cuvint=0;
        }
    }
}
int c=lungcuv/cuv;
fout<<c<<"\n";


}