Cod sursa(job #501982)
Utilizator | Data | 17 noiembrie 2010 12:01:25 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
int main()
{
char a;
int x, y, z;
x=0;
y=0;
z=0;
while(in.get(a))
{
if(isalpha(a))
{
y++;
if(z==0)
x++;
z=1;
}
else
z=0;
}
out << y << '\n';
out << x << '\n';
return 0;
}