خرید بک لینک

Vote count: 0

I'm trying to sort a string array according to increasing id, but when I run the program the array is not will sorted

void sortList(string ID[], string students[], float score[], char grade[], int size){

for (int pass=1; pass<size; pass++)
    for (int i=0; i<pass-1; i++)  
        if(ID[i]>ID[i+1]){
            string temp;
            temp=ID[i];
            ID[i]=ID[i+1];
            ID[i+1]=temp;

        }// if statement


retu;

}

asked 1 min ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: جمعه 14 اسفند 1394 ساعت: 0:00

صفحه بندی