Cod sursa(job #1003976)
Utilizator | Data | 1 octombrie 2013 20:29:38 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include<fstream>
#include<string>
using namespace std;
int main()
{
char a;
int x,y,z;
ifstream f("text.in", ios::in);
ofstream g("text.out", ios::out);
x=0;
y=0;
z=0;
while(f.get(a)!=0)
{if((a>='a' && a<='z') || (a>='A' && a<='Z'))
{
x++;
y=1;}
else
if(y==1)
{
z++;
y=0;}}
g<<x/z;
return 0;}