Skip to content

sadique21hs/Shorting-Algoritm-bubble-short-

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

#include<stdio.h> void bubblesort(int A[],int n){ for(int i=1; i<=n-1;i++){ for(int j=0; j<=n-1-i; j++){ if(A[j]>A[j+1]){ int temp=A[j]; A[j]=A[j+1]; A[j+1]=temp; } } }

} void printarr(int A[],int n){ for(int i=0;i<n;i++){ printf("%d",A[i]); } printf("\n"); }

int main(){ int arr[]={4,7,1,5,2,3,9,8,6}; int n=9; printarr(arr,n); bubblesort(arr,n); printarr(arr,n); return 0;

}

Shorting-Algoritm-bubble-short-

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published