Cod sursa(job #818853)
Utilizator | Data | 18 noiembrie 2012 09:52:03 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <string.h>
#include <fstream>
#include <cmath>
using namespace std;
int main()
{
char a,b;
int x=0,y=0;
ifstream f("text.in");
ofstream g("text.out");
while(f.get(a))
{
if(((65<=a)&&(a<=90))||((97<=a)&&(a<=122)))
x++;
else
if(((65<=b)&&(b<=90))||((97<=b)&&(b<=122)))
y++;
b=a;
}
g<<x/y;
return 0;
}