Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int i=0; i<n; i++)
- {
- for(int j=0; j<k; j++)
- {
- if(vetor[j]>vetor[j+1])
- {
- aux=vetor[j];
- vetor[j]=vetor[j+1];
- vetor[j+1]=aux;
- }
- }
- k--;
- }
- bubble(vetor);
- printf("nnn");
- for(int i=0;i<n;i++)
- {
- printf("%dn",vetor[i]);
- }
- printf("nnn");
- system("pause");
- return 0;
- for(int i=0; i<n; i++)
- {
- for(int j=0; j<k; j++)
- {
- if(vetor[j]>vetor[j+1])
- {
- aux=vetor[j];
- vetor[j]=vetor[j+1];
- vetor[j+1]=aux;
- }
- }
- k--;
- }
- bubble(vetor,n);
- printf("nnn");
- for(int i=0;i<n;i++)
- {
- printf("%dn",vetor[i]);
- }
- printf("nnn");
- system("pause");
- return 0;
Add Comment
Please, Sign In to add comment