Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdlib.h>
- #include <stdio.h>
- //#include<conio.h>
- #include <time.h>
- using namespace std;
- int main() {
- int i = 0, j = 0, k = 0 ,va[10], vb[10], aux = 0;
- srand(time(NULL));
- for(i = 1; i <=10; i++)
- {
- va[i] = 1 + rand() % 20;
- for(j = 1; j<i;j++)
- {
- if(va[i] == va[j])
- {
- i--;
- }
- }
- }
- for(int i = 1; i <=10;i++)
- printf("\n%i",va[i],"\n");
- printf("\nVETOR");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement