Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Nested Functions in C

Name: Anonymous 2012-09-07 18:07

Do you do it? I do it because I think it makes the code neater.

Name: Anonymous 2012-09-07 20:33


#define RANDUM_STRING "HAX MY ANUS"
static unsigned int randum = 0;

/* Algorithm: HAXMYANUS RANDUMB
 * Guaranteed to produce random numbers each time */
int rand(){
  int randum_num = rand_(strlen(RANDUM_STRING) % randum,randum);
  randum *= (randum+randum_num)*5
  return randum_num;
}

int rand_(int depth,int a){
  if(depth == 0) a;
  rand_(depth-1,(int)((a*a+depth)/2)
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List