SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7.     int tab[10];
  8.     int tab1[10];
  9.     int indextab1 = 0;
  10.  
  11.     for (int i = 0; i < 10; i++) {
  12.         cin >> tab[i];
  13.     }
  14.     for (int i = 0; i < 10; i++) {
  15.         bool znajdujesie = false;
  16.         for (int j = 0; j < indextab1; j++) {
  17.             if (tab[i] == tab1[j]) {
  18.                 znajdujesie = true;
  19.             }
  20.         }
  21.         if (!znajdujesie) {
  22.             tab1[indextab1++] = tab[i];
  23.             cout << tab[i] << " ";
  24.         }
  25.     }
  26.  
  27.  
  28.  
  29.     return 0;
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top