Cod sursa(job #1912720)
Utilizator | Data | 8 martie 2017 10:20:40 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include<fstream>
#include<iostream>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
int main()
{
char a,b='\0';
unsigned long long int cuv=0,nr=0;
while(in.get(a))
{
if((a<='Z' and a>='A' ) or (a>='a' and a<='z'))
nr++;
else
if((b<='Z' and b>='A' ) or (b>='a' and b<='z'))
cuv++;
b=a;
}
out<<nr/cuv;
}