Cod sursa(job #945889)
Utilizator | Data | 3 mai 2013 11:43:38 | |
---|---|---|---|
Problema | Text | Scor | 50 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int i,j,l,lm;
char c,d;
int main()
{
while(f>>noskipws>>c){if(c>'A'&&c<='z')lm++;
else if(c>=' '&&c<'?'&&lm>0&&d>='A'&&d<='z')l++;
d=c; }
g<<lm/l;
f.close();
g.close();
return 0;
}