Cod sursa(job #799536)
Utilizator | Data | 19 octombrie 2012 11:52:30 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.36 kb |
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
char a;
int k=0,k1=0,ok=0;
while(f>>a)
{
if( (a>=65 && a<=90) || ( a>=97 && a<=122) )
{
ok=1;k1++;
}
else
{
if(ok==1)
{ok=0;k++;}
}
}
int r;
r=k1/k;
g<<k;
return 0;
}