Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int mess(int n){
- int r, i;
- static int mass[100];
- r = rand()%100 + 1;
- if(i==0) {
- mass[0] = r;
- }
- else {
- r = rand()%100 + 1;
- for(i=0;i<100;i++){ //цикл сравнения n-ного эл со всеми
- if(mass[i]!=r&&i<n){
- }
- else if(i = n){
- mass[n] = r;
- printf("%d", mass[n]);
- }
- else
- break;
- }
- }
- }
- int main() {
- int i, n = 0;
- for(i=0; i<=100; i++){
- mess(n);
- n++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement