#include <stdio.h>
int scores[8] = {45,80,23,79,60,59,88,99 };int main(void){ int tmp,i,j,index;
for (j = 0; j < 8; j++) { index = j; for (i = j+1; i < 8; i++) { if (scores[i] < scores[index]) index = i; } tmp = scores[index]; scores[index] = scores[j]; scores[j] = tmp; } for (i = 0; i < 8; i++) { printf("%d ", scores[i]); }}