#include<stdio.h>
#include<database.h>
#include<graphics.h>
#define s 60
int sn[s],cn[s],s1[s],s2[s],s3[s],mo[s],gr[s],ex[s];
float page[s];
double cav;
void main()
{
int m,d,m1,j,t,e;
char ch;
d=DETECT;
initgraph(&d,&m,"C:\\TC\\BGI");
cleardevice();
setcolor(10);
setbkcolor(8);
printf("Enter NUMBER of Students in the CLASS:");
scanf("%d",&m1);
for(j=0;j<m1;j++)
{
inputs(cn,s1,s2,s3,j);
mao(mo,s1,s2,s3,j);
age(page,mo,j);
gra(gr,page,j);
}
cav=cavg(mo,m1);
display(sn,cn,s1,s2,s3,mo,page,gr,m1,cav);
printf("\n\nDo You Want to See who is TOPPER & who is NULL ?(Y/N)");
ch=getch();
if(ch=='y' || ch=='Y')
first_last(mo,cn,m1);
else
printf("\nOK");
printf("\n\nDo You Want to Sort the Table w.r.t T.MARKS ?(Y/N)");
ch=getch();
if(ch=='y' || ch=='Y')
{
printf("\nPress 'a' for ASCENDING ORDER & 'd' for DESCENDING ORDER");
ch=getch();
if(ch=='a' || ch=='A')
{
sortA_mao(cn,s1,s2,s3,mo,page,gr,ex,m1);
S_display(cn,s1,s2,s3,mo,page,gr,m1,cav);
}
else
{
sortD_mao(cn,s1,s2,s3,mo,page,gr,ex,m1);
S_display(cn,s1,s2,s3,mo,page,gr,m1,cav);
}
}
else
printf("\nOK");
printf("\nDo You Want to See the Records of Particular Students ?(Y/N)");
ch=getch();
if(ch=='y' || ch=='Y')
{
clrscr();
printf("How Many RECORDS You want to See ?");
scanf("%d",&t);
for(j=1;j<=t;j++)
{
printf("\nEnter Class No. of the Student Whose Record You Want to Fetch:");
scanf("%d",&e);
fetch(cn,s1,s2,s3,mo,page,gr,e,m1);
}
}
else
printf("\nOK");
getch();
closegraph();
}
Maybe Github would be the place to post your source code.
ReplyDeleteIf it was a decent post about linked lists that actually had plain text explaining what it's doing and why it would be of use.
Currently it just looks like a bit of meaningless copy and paste from some homework sheet.
There are not even comments in the code. Very unprofessional, very amature.