box-o-sand/lcthw/ex8.c

22 lines
347 B
C
Raw Normal View History

2024-04-16 12:17:54 +00:00
#include <stdio.h>
int main(int argc, char* argv[])
{
int i = 0;
if (argc == 1) {
2024-04-17 00:45:47 +00:00
printf("You have no argument.\n");
2024-04-16 12:17:54 +00:00
} 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.\n");
}
return 0;
}