این نوع برنامه یک لیست از نام و نمرات نمره داده شده را مرتب می کند
#include<stdio.h>
#include<conio.h>
#include<string.h>
#define N 5
// This program sort a given list of name and scores by score.
// Morteza Zafari 2001
void main()
{
clrscr();
char name[N][20],tmpstr[20];
float score[N],tmpscr;
int i,j,c=0;
printf("n This program sort a given list of name and scores by score.n");
for (i=0;i<N;i++){
printf("n Enter name No %d: ",i+1);
gets(name[i]);
printf("n Enter name %s's score: ",name[i]);
scanf("%f",score[i]);
}
for (i=0;i<N;i++){
for (j=0;j<N;j++){
if (score[c+1]<=score[c]){
strcpy(tmpstr,name[c]);
strcpy(name[c],name[c+1]);
strcpy(name[c+1],tmpstr);
tmpscr=score[c];
score[c]=score[c+1];
score[c+1]=tmpscr;
}
c++;
}
c=0;
}
for (i=0;i<N;i++){
printf("n Name No %d: ",i+1);
puts(name[i]);
}
getch();
}


مقالات و تحقیق ها با فرمت ورد\الگوریتم های مرتب سازی
دانلود سورس برنامه حسابداری به زبان ویژوال بیسیک