Cod sursa(job #1595301)

Utilizator Andrei_CotorAndrei Cotor Andrei_Cotor Data 10 februarie 2016 10:15:02
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <fstream>
using namespace std;ifstream fi("text.in");ofstream fo("text.out");int Nr_char,Nr_Cuv;char c;bool cuv_bun;int main(){while(!fi.eof()){fi.get(c);if((c>='A' && c<='Z') || (c>='a' && c<='z')){Nr_char++;cuv_bun=true;}else if(cuv_bun==true){Nr_Cuv++;cuv_bun=false;}}fo<<Nr_char/Nr_Cuv;fi.close();fo.close();return 0;}