Cod sursa(job #563735)
Utilizator | Data | 25 martie 2011 20:47:09 | |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.29 kb |
#include<fstream.h>
ifstream f("text.in");
ofstream g("text.out");
main()
{
long long n1=0,n2=0,c,b;
char a;
c=0;
while(!f.eof())
{
b=c;
a=f.get();
c=a;
if(((c>=65)&&(c<=90))||((c>=97)&&(c<=122))) n1++;
else n2++;
}
if(n2==0) g<<n1;
else
g<<n1/n2;
}