Cod sursa(job #976250)
Utilizator | Data | 22 iulie 2013 21:13:29 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
long i,j,d,s,h,b;
char a;
int main()
{
fin>>a;
while(a!='\0')
{
if(a>='A' && a<='Z')
{
h++;
if(b==0)
d++,b=1;
}
else
if(a>='a' && a<='z')
{
h++;
if(b==0)
d++,b=1;
}
else
b=0;
a='\0';
fin.get(a);
}
fout<<h/d;
return 0;
}