ex12
This commit is contained in:
parent
609dbcb7d8
commit
7bcf4272bc
1
lcthw-remnants-2/.gitignore
vendored
1
lcthw-remnants-2/.gitignore
vendored
@ -9,3 +9,4 @@ ex9
|
||||
ex9-ec
|
||||
ex10
|
||||
ex11
|
||||
ex12
|
||||
|
21
lcthw-remnants-2/ex12.c
Normal file
21
lcthw-remnants-2/ex12.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user