Cod sursa(job #232372)
Utilizator | Data | 15 decembrie 2008 09:00:44 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.31 kb |
#include<iostream.h>
#include<fstream.h>
#include<string.h>
void main()
{
ifstream f("text.in");
ofstream g("text.out");
char a;
unsigned long nr=0,nr1=0,s;
while(f>>a)
{
if((a>='a' && a<='z') || (a>='A' &&a<='Z'))
nr++;
else
nr1++;
}
s=nr/nr1;
g<<s;
f.close();
g.close();
}