Cod sursa(job #411704)
Utilizator | Data | 5 martie 2010 08:52:24 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<fstream>
using namespace std;
char a=' ',c;
int l,n;
int main()
{
ifstream in("text.in");
while(in.get(c))
{
if((c>=65&&c<=90)||(c>=97&&c<=122)) n++;
else if((a>=65&&a<=90)||(a>=97&&a<=122)) l++;
a=c;
}
ofstream out("text.out");
out<<n/l;
return 0;
}