Pagini recente » Cod sursa (job #1292075) | Cod sursa (job #1312847)
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
char c;
int contor = 0 ;
while(f>>c)
if(c>=65 && c<=122 && c!=91 && c!=92 && c!=93 && c!=94 && c!=95 && c!=96)
contor++;
f.close();
ifstream f2("text.in");
int i = 0;
char s[1000],*p,sep[]="0987654321!@#$%^&*()-=_+{[}]|\;:,<.>/? ";
f2.get(s,10000);
int nr=0;
p=strtok(s,sep);
while(p)
{
nr++;
p=strtok(0,sep);
} g<<contor/nr;
return 0;
}