Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- int main(int argc, char **argv) {
- char *p;
- int a, b;
- if (argc != 3) exit(1);
- for (p = argv[1]; *p; p++) if (!isdigit(*p)) exit(1);
- for (p = argv[2]; *p; p++) if (!isdigit(*p)) exit(1);
- a = atoi(argv[1]);
- b = atoi(argv[2]);
- if (100 < a || 100 < b) exit(1);
- printf("argv[1]: %d, argv[2]: %d\n", a, b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement