Cod sursa(job #644228)

Utilizator Cristina94Cristina Ungurean Cristina94 Data 5 decembrie 2011 17:59:06
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.44 kb
#include<stdio.h>
#include<iostream>
#include<string>

using namespace std;
int main()
{
	freopen("text.in","r",stdin);
	freopen("text.out","w",stdout);
	
	int nr,a,b;
	char s[1025], *p, sp[]=" ,.<>/?;:'{[}]|=+-_)(*&^%$#@!`~", aux[1025];
	cin.get(s,100);
	aux[0]=0;
	nr=0;
	p=strtok(s,sp);
	while(p)
	{
		nr++;
		strcat(aux,p);
		p=strtok(NULL,sp); 
		
	}
	a=strlen(aux);
	nr=a/nr;
	printf("%d", nr);
	return 0;
	
}