Cod sursa(job #29240)
Utilizator | Lobont Andrei JacKtHeRIpEr | Data | 8 martie 2007 20:13:43 |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include"fstream.h"
#include"string.h"
main()
{
ifstream f("text.in");
ofstream o("text.out");
unsigned long lit;
unsigned int cuv, i;
char l[30];
while(!f.eof())
{
f>>l;
if(l[0]>='a' && l[0]<='z' || l[0]>='A' && l[0]<='Z')
{
cuv++;
for(i=1;i<=strlen(l);i++)
if(l[i]>='a' && l[i]<='z' || l[i]>='A' && l[i]<='Z')
lit++;
else
cuv++;
}
}
}