Cod sursa(job #1564121)
| Utilizator | Data | 8 ianuarie 2016 15:12:15 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
char citit;
int cuvant=0,litera=0,cica;
while(fin.get(citit))
{
if((citit>=65 && citit<=90) || (citit>=97 && citit<=122))
{
litera++;
cica=1;
}
else
{
if(cica)
{
cica=0;
cuvant++;
}
}
}
if(cica)
fout << lit/(cuv+1);
else
fout << lit/cuv;
return 0;
}