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.

249KB Sizes 1 Downloads 151 Views

Recommend Documents

ON THE MINIMAX ESTIMATION PROBLEM OF A ... - rtcb.iitp.ru
For an elementary inference of these formulas we refer the reader to [3]. ...... [8] C. C. Taylor, A new method for unfolding sphere size distributions, J. Microscopy, ...

Two approaches to solving a problem on GP.pdf
Sign in. Page. 1. /. 2. Loading… Page 1 of 2. Page 1 of 2. Eton Education Centre. Two approaches to solving a problem on geometric progression. By Wee WS ...