This commit is contained in:
Dan Buch 2016-04-12 12:14:30 -04:00
parent 609dbcb7d8
commit 7bcf4272bc
2 changed files with 22 additions and 0 deletions

View File

@ -9,3 +9,4 @@ ex9
ex9-ec
ex10
ex11
ex12

21
lcthw-remnants-2/ex12.c Normal file
View File

@ -0,0 +1,21 @@
#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;
}