Cod sursa(job #1502706)
Utilizator | Data | 14 octombrie 2015 22:25:57 | |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <iostream>
#include <fstream>
using namespace std;
char a,c;
int d,i,b;
int pot;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
while(f.get(a))
{
if((a>=65 and a<=90) or (a>=97 and a<=122)){i++;pot=1;}
if(pot==1) if((a==' ') or (a=='.') or (a==',') or (a==';') or (a=='-')) b++;
}
b++;
d=i/b;
g<<d;
return 0;
}