Cod sursa(job #1630754)
Utilizator | Data | 5 martie 2016 11:09:18 | |
---|---|---|---|
Problema | Text | Scor | 50 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
char x;
int s,s1;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
while(f.get(x))
{
if(x==' ') s1++;
if((x>='A' && x<='Z')||(x>='a' && x<='z')) s++;
}
s1++;
g<<s/s1;
return 0;
}