Pagini recente » Istoria paginii runda/preoji2014_0_10 | Istoria paginii runda/11111111111111111/clasament | Cod sursa (job #624702) | Istoria paginii runda/de_la_inceput/clasament | Cod sursa (job #1535424)
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char text[256],v[]=",.!?-:;",*sp,*q,k=0;
int lung_text=0,nr_cuv=0;
f.get(text,256);
while(k<=strlen(text)-1 && (strchr(v,text[k]) || text[k]==' '))
{
k++;
}
strcpy(text,text+k);
if(strchr(v,text[strlen(text)-1]))
text[strlen(text)-1]=NULL;
for(int i=0;i<=strlen(text)-1;i++)
{
if(('a'<=text[i] && text[i]<='z') || ('A'<=text[i] && text[i]<='Z'))
lung_text++;
else
{
nr_cuv++;
}
}
}