SHARE
TWEET

ghkjh

a guest Nov 15th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int mess(int n){
  2.     int r, i;
  3.     static int mass[100];
  4.    
  5.     r = rand()%100 + 1;
  6.     if(i==0) {
  7.         mass[0] = r;
  8.     }
  9.    
  10.     else {
  11.         r = rand()%100 + 1;
  12.  
  13.         for(i=0;i<100;i++){ //цикл сравнения n-ного эл со всеми
  14.             if(mass[i]!=r&&i<n){
  15.             }
  16.            
  17.             else if(i = n){
  18.                 mass[n] = r;
  19.                 printf("%d", mass[n]);
  20.             }
  21.             else
  22.                 break;
  23.             }
  24.     }
  25. }
  26.  
  27.  
  28. int main() {
  29.     int i, n = 0;
  30.     for(i=0; i<=100; i++){
  31.         mess(n);
  32.         n++;
  33.         }
  34. }
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