Pagini recente » Istoria paginii runda/simulare-cartita-34 | Cod sursa (job #1519650) | Cod sursa (job #2036596) | Cod sursa (job #2482786) | Cod sursa (job #1561873)
#include <iostream>
#include <cstring>
#include <cctype>
#include <fstream>
using namespace std;
int main()
{ char s[10000], *p ;
int nr=0, k=0, r, sh=0;
ifstream f("text.in");
ofstream g("text.out");
f.get(s,10000);
r=strlen(s);
for (p=s;*p;p++) if(isalpha(*p)) nr++;
for (p=strtok(s," ");p;p=strtok(NULL," ")) sh++;
g<<nr/sh;
return 0;
}