Advertisement
Pixelizing

Untitled

Apr 24th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1.  
  2.  
  3. #include <stdio.h>
  4.  
  5. #define MAX_CHARS 4097
  6.  
  7. int main(void) {
  8.  
  9.     char string[MAX_CHARS];
  10.     printf("Enter 6 integers: ");
  11.     fgets(string, MAX_CHARS, stdin);
  12.  
  13.     int num1, num2, num3, num4, num5, num6;
  14.     if (sscanf(string, "%d %d %d %d %d %d",
  15.         &num1, &num2, &num3, &num4, &num5, &num6) != 6) {
  16.         printf("incorrect inputs");
  17.     } else {
  18.         printf("correct inputs");
  19.     }
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement