Cod sursa(job #2225582)
Utilizator | Data | 27 iulie 2018 17:07:15 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main(){
int cuvinte=1,caractere=0;
char x;
while((x = fin.get()) != EOF){
if(isalpha(x)){ caractere+=1;}
else if(x==' '){ cuvinte+=1;};
}
fout << caractere/cuvinte;
return 0;
}