2
My teacher posed this problem and I’m not able to sort in ascending order just by using a loop to sort.
#include<stdio.h>
main(){
    int i,a[5]={1,4,8,9,11},b[5]={3,6,7,10,15},c[10];
    for(i=0;i<10;i++){
        if(a[i]<b[i] || b[i]>a[i]){
        }
    }
    for(i=0;i<10;i++){
        printf("%d\n",c[i]);            
    }   
}
Look for the Merge Sort algorithm
– Sveen
Have you ever thought of doing one for inside another for testing conditions?
– Eduardo Cardoso