Cod sursa(job #821345)
| Utilizator | Data | 22 noiembrie 2012 10:31:56 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.45 kb |
#include<iostream>
#include<stdio.h>
using namespace std;
char s1,stv=' ';
int i,nrlit,nrcuv;
int litera(char x)
{if((x>='A' && x<='Z') || (x>='a' && x<='z' ))return 1;
else return 0;}
int main(){
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while((s1=cin.get())!=EOF)
{
if(litera(s1)){nrlit++; stv=s1; }
else {
if(litera(stv)){ nrcuv++; stv=s1; }
}
}
printf("%d",nrlit/nrcuv);
return 0;}
