Cod sursa(job #2303445)
Utilizator | Data | 16 decembrie 2018 12:27:33 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <iostream>
#include <string.h>
#define DIM 500000
#include <fstream>
using namespace std;
int main()
{
ifstream cin ("text.in");
ofstream cout ("text.out");
char s;
int nr1 = 0, nr2 = 0;
while (cin >> noskipws >> s){
if (isalpha(s)){
nr1 ++;
while (isalpha(s)){
nr2 ++;
cin >> noskipws >> s;
}
}
}
cout << nr2 / nr1 ;
return 0;
}