
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

#include<iostream.h> #include<conio.h> void main (void) { int a[10]={3,4,51,8,5,45,7,0,9,11}; int i,j,b; clrscr(); for (i=0;i<=10;i++) for (j=i+1;j<10;j++) { if (a[i]>=a[j]) { b=a[i]; a[i]=a[j]; a[j]=b; } } for (i=0;i<10;i++) { cout<<" "<<a[i]; } getch(); }