ProAnswers.org

C Program for Bubble Sort

C Program for Bubble Sort.

1 Like

#include
void main()
{
int A[20], N, Temp, i, j;
printf("

 ENTER THE NUMBER OF TERMS: ");
scanf("%d",&N);
printf("
 ENTER THE ELEMENTS OF THE ARRAY:");
for(i=0; iA[j+1])
		{
			Temp = A[j];
			A[j] = A[j+1];
			A[j+1] = Temp;
		}
printf("
THE ASCENDING ORDER LIST IS:

");
for(i=0; i