From 283e7b301d6dc16d4d2bef6fe5b7c93efcbaeac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Fri, 30 Nov 2012 14:04:31 +0100 Subject: [PATCH] First commit --- README.md | 4 ++++ leo.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 README.md create mode 100644 leo.c diff --git a/README.md b/README.md new file mode 100644 index 0000000..a5f9a26 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +Leo Phantastic IA Simulator +=========================== + +So here we have a superb simulation of our friend Leo in action. Just go an ask him anything through the command line and he will give you his special reply. diff --git a/leo.c b/leo.c new file mode 100644 index 0000000..7cb9736 --- /dev/null +++ b/leo.c @@ -0,0 +1,72 @@ +/* + * Programa Leo: Variación del programa de la bola ocho, versión de Leo. + */ + +#include +#include +#include + + +int main(int argc, char **argv[]) +{ + int aleatorio; + + if (argc < 2) + { + printf("Preguntame algo, gilipipas...\n"); + return 1; + } + + srandom(time(NULL)); + + aleatorio = random() % 11; + + switch (aleatorio) + { + case 0: + printf("No te fologüeo...\n"); + break; + + case 1: + printf("Guat ar llu cauntin mi?\n"); + break; + + case 2: + printf("Hijo de puta!\n"); + break; + + case 3: + printf("Hablemos del mineralismo...\n"); + break; + + case 4: + printf("ig2 = ig[\"g2\"][g2] = {\"cs\":og2[\"cs\"], \"l\":0, \"sg\":{}}\n"); + break; + + case 5: + printf("Don't be a palurd!\n"); + break; + + case 6: + printf("Qué gilipipas!\n"); + break; + + case 7: + printf("Ai geit llu!\n"); + break; + + case 8: + printf("Lo haces fatal!\n"); + break; + + case 9: + printf("A-tot-cha!\n"); + break; + + case 10: + printf("No.\n"); + break; + } + + return 0; +}