Cod sursa(job #2044585)
Utilizator | Data | 21 octombrie 2017 11:10:46 | |
---|---|---|---|
Problema | Text | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
//#include <iostream>
#include <fstream>
#include <string>
#include <cctype>
using namespace std;
int main()
{
int s=2;
string line;
ifstream f("text.in");
getline(f, line);
for (int i=0; i < line.length(); i++) {
if (!isalpha(line[i])) s++;
}
ofstream cout ("text.out");
cout << line.length()/s;
return 0;
}