
How can i write a code for sort ascending order to ten given numbers.
Thank you

Receive the numbers into an array. double num[10]. or int num[10].
You then need to traverse the array elements and swap them into the desired order.
int temp = 0;
for (int j=0; j<10; j++) {
for (int i=0; i<9; i++) {
if (num[i] > num[i+1]) {
temp = num[i];
num[i] = num[i+1];
num[i+1] = temp;
}
}
elimence@gmail.com
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.