Practical Number 6
Practical Number 6
Practical Number 6
#include<iostream>
using namespace std;
int main(){
int n;
cout<<"Enter number of element in array : ";
cin>>n;
int arr[n];
16
cout<<endl<<"Enter element in array : ";
for(int i=0; i<n; i++){
cin>>arr[i];
}
bubbleSort(arr,n);
cout<<endl<<"Array after sorting : ";
for(int i=0; i<n; i++){
cout<<arr[i]<<" ";
}
return 0;
}
Output:
17