#includeusingnamespacestd;intmul(intn){intm=1;while(n!=0){m=m*n;n--;}returnm;}intmain(){inti=1,n;intsum=0;cout>n;do{sum=sum+mul(i);i++;}while(i<=n);cout<<"sum="<
#include
/* count characters in input; 2nd version */
main()
{
double nc;
for (nc = 0; gechar() != EOF; ++nc)
;
printf("%.0f\n", nc);
}
#include
void main()
{ int i,n,s;
s=0; scanf("%d",&n);
for ( i=1;i<=n;i++ ) if ( i%3 ) s+=i;
printf("%d\n",s);
}