Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define MAX_CHARS 4097
- int main(void) {
- char string[MAX_CHARS];
- printf("Enter 6 integers: ");
- fgets(string, MAX_CHARS, stdin);
- int num1, num2, num3, num4, num5, num6;
- if (sscanf(string, "%d %d %d %d %d %d",
- &num1, &num2, &num3, &num4, &num5, &num6) != 6) {
- printf("incorrect inputs");
- } else {
- printf("correct inputs");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement