Cod sursa(job #861481)

Utilizator superman_01Avramescu Cristian superman_01 Data 21 ianuarie 2013 16:59:03
Problema Text Scor 100
Compilator cpp Status done
Runda Siruri-1 Marime 0.56 kb
#include<fstream>
 
using namespace std;
 
ifstream f("text.in");
ofstream g("text.out");
char b,c;
int contor1,contor2,q;
int main()
{
     
    while(f.get(c))
    {
         
        if (( c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z' ) )
        {
            contor1++;
        }
         
        else
        if (( b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z' ) )
         contor2++;
             
            b=c;
             
    }
     
     
     
    g<<contor1/contor2;
     
    f.close();
    g.close();
    return 0;
}