Cod sursa(job #965189)
Utilizator | Data | 23 iunie 2013 17:31:05 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <iostream>
#include <fstream>
#include <string.h>
#define NMax 60000001
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char c;
int main ()
{
unsigned long long cuv=0,litere=0,rez;
bool ok=0;
while (f.get(c))
{
while ((65<=c && c<=90) || (97<=c && c<=122)) {ok=1;f.get(c);litere++;}
if (ok)
{
cuv++;
ok=0;
}
}
rez=litere/cuv;
g<<rez;
}