Home
Add Document
Sign In
Create An Account
Viewer
Transcript
1
A simple problem on sorted array Algorithm:
Description:
2
Program: #include
#include
void main(){
int s,temp,i,j,a[20]; clrscr();
printf("Enter total numbers of elements: "); scanf("%d",&s);
printf("Enter %d elements: ",s); for(i=0;i
//Bubble sorting algorithm for(i=s-2;i>=0;i--){ for(j=0;j<=i;j++){ if(a[j]>a[j+1]){ temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } printf("After sorting: "); for(i=0;i
A simple problem on sorted array.pdf
A simple problem on
sorted array
.
pdf
. A simple problem on
sorted array
.
pdf
. Open. Extract. Open with. Sign In. Main menu.
Download PDF
249KB Sizes
1 Downloads
170 Views
Report
Recommend Documents
No documents
×
Report A simple problem on sorted array.pdf
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
×
Sign In
Email
Password
Remember Password
Forgot Password?
Sign In