Cod sursa(job #2337696)
Utilizator | Data | 6 februarie 2019 17:13:38 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char c;
int litere,cuvinte;
int main()
{
bool incep=1;
while(f.get(c))
{
if((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
if(incep)
cuvinte++;
litere++;
incep=0;
}
else
incep=1;
}
g<<litere/cuvinte;
return 0;
}