From 2a59add795d52fabd27eba78bfff3bec2dd63477 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 10 Sep 2011 11:54:21 -0400 Subject: [PATCH] first version of ex12 --- ex12.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ex12.c diff --git a/ex12.c b/ex12.c new file mode 100644 index 0000000..91e7b3e --- /dev/null +++ b/ex12.c @@ -0,0 +1,20 @@ +#include + +int main(int argc, char *argv[]) +{ + int i = 0; + + if(argc == 1) { + printf("You only have one argument. You suck.\n"); + } else if(argc > 1 && argc < 4) { + printf("Here's your arguments:\n"); + + for (i = 0; i< argc; i++) { + printf("%s ", argv[i]); + } + printf("\n"); + } else { + printf("You have too many arguments. You suck.\n"); + } + return 0; +}