Cod sursa(job #1448886)

Utilizator ArkkAlexandru Arkk Data 8 iunie 2015 09:47:04
Problema Text Scor 40
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#include <iostream>
#include <fstream>
using namespace std;
char a,c;
int d,i,b;
int pot;
int main()
{
    ifstream f("text.in");
    ofstream g("text.out");
    while(f.get(a))
         {

            if((a>=65 and a<=90) or (a>=97 and a<=122)){i++;pot=1;}
            if(pot==1) if((a=='-') or (a==' ')) b++;
         }
         b++;
         d=i/b;
         g<<d;
         cout.flush();

    return 0;
}