Cod sursa(job #487971)
Utilizator | Data | 27 septembrie 2010 10:15:55 | |
---|---|---|---|
Problema | Text | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
char a; int cont=1, k=0;
while(!('a'<=a&&a<='z')&&!('A'<=a&&a<='Z'))
f.get(a);
while(f.get(a))
{
if(('a'<=a&&a<='z')||('A'<=a&&a<='Z'))
cont++;
else
k++;
}
g<<cont/k;
return 0;
}