/* sscanf-test.c in class, 23 Oct 2023 */ #include int main() { char input[100]; printf("Give me two integers separated by a space "); if (fgets(input, 100, stdin) != NULL) { int a, b; if (sscanf(input, "%d %d", &a, &b) != 2) { printf("Wrong format, bucko\n"); } else { printf("Your numbers, squared, are %d and %d\n", a*a, b*b); } // printf("You said: %s\n", input); } return 0; }