Cod sursa(job #1013786)
Utilizator | Data | 21 octombrie 2013 19:06:03 | |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.27 kb |
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int a,b;
char c;
long long nr;
int main()
{
while(f.get(c))
{if(c>='a' && c<='z' || c>='A' && c<='Z') a=a+1;
else if(a!=0) b=b+1;
}
g<<a/b<<'\n';
g.close();
return 0;
}