first version of ex12

This commit is contained in:
Dan Buch 2011-09-10 11:54:21 -04:00
parent 34d54382d4
commit 2a59add795

20
ex12.c Normal file
View File

@ -0,0 +1,20 @@
#include <stdio.h>
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;
}