Cod sursa(job #2595582)
Utilizator | Data | 7 aprilie 2020 22:25:37 | |
---|---|---|---|
Problema | Text | Scor | 50 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include<fstream>
#include <iostream>
#include<string.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
int aux=0,c=1, lm=0;
char a;
while (fin>> noskipws>> a) {
if (a == ' ') {
c++;
}
if ((a<=90 && a>=65) || (a>=97 && a<=122)) {
aux++;
}
}
lm = aux / c;
fout << lm<<" ";
return 0;
}