Cod sursa(job #252950)
Utilizator | Data | 5 februarie 2009 10:47:24 | |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<fstream>
#include<string>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main(){
char c;
int lit=0,cuv=0;
do{
f.get(c);
if(c>=65 && c<=122) lit++;
if(c==32) cuv++;}
while(c!='!' && c!='?' && c!='.');
g<<lit/cuv;
f.close();
g.close();
return 0;
}