Pagini recente » Borderou de evaluare (job #1840739) | Borderou de evaluare (job #1810161) | Borderou de evaluare (job #732976) | Borderou de evaluare (job #2229488) | Cod sursa (job #641802)
Cod sursa(job #641802)
#include<fstream>
#include<string.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main ()
{
char text[1000];
f.get(text,100);
char car[]=" ,!?.";
int nrcuv=0,litere=0;
int n=strlen(text);
for(int i=0;i<n;i++)
{
if (strchr(" ",text[i]))
nrcuv++;
if(strchr("-",text[i]))
nrcuv++;
if(isalpha(text[i]))
litere++;
}
g<<litere/(nrcuv-1);
return 0;
}