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

hay look at my recursive pow

Name: Anonymous 2009-03-04 20:14


#include <stdio.h>
#include <stdlib.h>

unsigned long long rpow(int n, int p) {
  return p ? p==1 ? n : n * rpow(n,p-1) : 1;
}

int main(int argc, char **argv) {
  if(argv[1])
    if(argv[2]) {
      int n = atoi(argv[1]);
      int p = atoi(argv[2]);
      printf("%llu\n",rpow(n,p));
    }
  return 0;
}

Name: FrozenVoid 2009-03-11 15:47

>>98
You are confusing my /prog/ scripts with my 4chan plans.
I develop both concurrently. If you haven't noticed the script isn't spamming repeated words, its an AI.

______________________________
The substructure of the universe regresses infinitely towards smaller and smaller components. Behind atoms we find electrons, and behind electrons, quarks. Each layer unraveled reveals new secrets, but also new mysteries.

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