Advertisement
tdttvd

Untitled

Dec 18th, 2021
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdbool.h>
  3.  
  4. int main()
  5. {
  6.     int x[100];
  7.     bool check[10];
  8.     int n;
  9.     scanf("%d", &n);
  10.  
  11.     for (int i = 0; i < n; i++)
  12.     {
  13.         scanf("%d", &x[i]);
  14.         if (!check[x[i]]) check[x[i]] = true;
  15.     }
  16.  
  17.     for (int i = 0; i < 10; i++)
  18.     {
  19.         if (!check[i]) printf("%d ", i);
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement