Cod sursa(job #1248532)
Utilizator | Data | 25 octombrie 2014 14:20:10 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include<iostream>
#include<fstream>
using namespace std;
int main(){
ifstream f("text.in");
ofstream g("text.out");
char a,b;
int count = 0, word = 0;
int next=0;
while (!f.eof()){
b = f.get();
if (b >= 'a' && b <= 'z' || b >= 'A' && b <= 'Z'){
count++;
if(next==0){
word++;
next=1;
}
}
else
next=0;
}
return 0;
}