Difference between r1.1 and the current
@@ -1,4 +1,5 @@
#include<stdio.h>
{{{
#include <stdio.h>
void main() {
int temp, i, j;
@@ -18,3 +19,4 @@
return 0;
}
}}}
#include <stdio.h> void main() { int temp, i, j; int arr[] = { 55,07,78,12,42 }; for (i = 4; i >= 1; i--) { for (j = 1; j <= i; j++) if (arr[j - 1] > arr[j]) { temp = arr[j - 1]; arr[j - 1] = arr[j]; arr[j] = temp; } } for (i = 0; i < 5; i++) printf("%d\n", arr[i]); return 0; }