Cod sursa(job #2409983)
Utilizator | Data | 19 aprilie 2019 16:54:56 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include<bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char ch;
int main()
{char alfabet[]="abcdefghijklmnopqrstuvwxyzABCDEFIJKLMNOPQRSTUVWXYZ";
int cuv=0,car=0,p=0;
while(f>>noskipws>>ch)
if(strchr(alfabet,ch))
{car++;
if(p==0)
cuv++;
p=1;
}
else
p=0;
g<<car/cuv;
f.close();
g.close();
return 0;
}