Cod sursa(job #876093)
Utilizator | buzatu marin razvan buzaturazvan | Data | 11 februarie 2013 11:47:26 |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.36 kb |
#include<iostream>
#include<fstream>
using namespace std;
main(){
ifstream f1("text.in");
ofstream f2("text.out");
int nrc=0,nrcu=0,ir,rest,z;
char c;
while(f1.get(c)){
ir=c;
if((65<=ir<=90)&&(97<=ir<=122))
z=1;
nrc++;}
else
if(z==1){
nrcu++;
z=0;}
}
cout<<nrc<<" "<<nrcu;
rest=nrc/nrcu;
f2<<rest;
}