Cod sursa(job #348732)
| Utilizator | Data | 16 septembrie 2009 18:27:36 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.52 kb |
#include<iostream>
#include<fstream>
using namespace std;
int main ()
{
ifstream x("text.in");
ofstream y("text.out");
char sp[]="!@#$%^&*()][><?/'; +|\''",c;
unsigned short nr=0,cv=0;
while(!x.eof())
{
x>>c;
if(!strchr(sp,c))
{
while(!x.eof() && !strchr(sp,c))
{
nr++;
x>>c;
}
cv++;
}
}
if(c!=0)
y<<nr/cv;
x.close();
y.close();
return 0;
}
