Commit de265d6b by emonyi

Upload New File

parent a26519da
Showing with 39 additions and 0 deletions
#include <stdio.h>
#define N 10
int main () {
int i, j, n, a;
int numberArray[N];
printf("Enter the 10 terms that need to be checked:\n ");
for (i=0; i < 11; i++){
scanf("%d", &numberArray[n]);
}
for (i = 0; i < 11; i++){
for(j = i + 1; j < 11; j++){
if (numberArray[i] > numberArray[j]){
a = numberArray[i];
numberArray[i] = numberArray[j];
numberArray[j] = a;
}
}
}
printf("The numbers are arranged in ascending order\n");
for(i = 0; i < 11; i++)
printf("%d\n", numberArray[i]);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment