View Code of Problem 75

#include <stdio.h>
int main(){
	int num[10];
	int i,j,min;
	for(i=0;i<10;i++)
		scanf("%d ",&num[i]);
	for(i=0; i<10; i++)
	{
		for(j=0; j<10; j++)
		{
			if(num[j+1]<num[j]){
				min=num[j];
				num[j]=num[j+1];
				num[j+1]=min;
			}
		}
	}
	for(i=0; i<10; i++)
		printf("%d\n",num[i]);
	return 0;
}

Double click to view unformatted code.


Back to problem 75