how to sorting this, i've problem to sort by jum_nilai from the highest until smallest
void lihatData(void)
{
if(pertama==NULL)
printf("Data tidak ada !!!");
else
{
printf("%3s %-20s %-12s %-5s %-7s %-7s %-5s %-5s\n","No","Nama","Jenis K","N Mtk","N B.Ind","N B.Ing","N IPA","Jumlah");
printf("--- -------------------- -------------- ------- ------- ------- ----- -----\n");
sekarang=pertama;
do
{
printf("%3d %-20s %-12s %-5d %-7d %-7d %-5d %-5d\n",\
sekarang->nomor,\
sekarang->nama,\
sekarang->jenis_k,\
sekarang->nilai1,\
sekarang->nilai2,\
sekarang->nilai3,\
sekarang->nilai4,\
sekarang->jum_nilai);
}
while((sekarang=sekarang->next) != NULL);
}
}