Cod sursa(job #2657435)
Utilizator | Data | 10 octombrie 2020 16:04:24 | |
---|---|---|---|
Problema | Text | Scor | 20 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <iostream>
#include <fstream>
using namespace std;
int o,n,c;
char a;
int main()
{
ifstream f ("text.in");
ofstream g ("text.out");
while (f.get(a))
{
if ('A'<=a && a<='Z')
{
n++;
o=1;
}
else if ('a'<=a && a<='z')
{
n++;
o=1;
}
else
{
if (o==1) c++;
}
}
g<<n/c;
}