Cod sursa(job #1766690)
| Utilizator | Data | 28 septembrie 2016 13:27:00 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <string.h>
#include <fstream>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
int cuvinte, mamaliga, litere;
char meh;
int main()
{
while(in.get(meh))
{
if((meh >= 'a' && meh <= 'z') || (meh >= 'A' && meh <= 'Z'))
{
++litere;
++mamaliga;
if(mamaliga == 1)
{
++cuvinte;
}
}
else
mamaliga = 0;
}
out << litere / cuvinte << "\n";
return 0;
}
