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: Anonymous 2009-03-11 16:01

>>103
Put it this way, i had to program a little shitty robot to compete in robot sumo? does that constitute an ai? I mean it responds "intelligently" to it's environment and to the other robot. Of course it isn't, it doesn't do anything intelligent at all, it does what i told it to depending on relevant conditions, the fact that i no longer had to directly interact with it is inconsequential. Your "AI" is no different, it gathers minimal information from /prog/, jumbles it a bit and posts it.

tl;dr IHBT

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