Академический Документы
Профессиональный Документы
Культура Документы
1915-1905 3
Student Record System in C
1915-1905 4
Student Record System in C
1915-1905 5
Student Record System in C
fprintf(fp,"%s %s %s %c
%c",record.snum,record.fname,record.sname,record.mi,record.
ccode);
gotoxy(5,21); clreol(); center(21,"Record successfully
added!");
printxy(79,21,""); gotoxy(53,22);
delay(1000);
center(22,"Press any key to go to main menu...");
getch();
fclose(fp);
}
void Temp1(void){
twolinebox(2,6,79,20);
twolinebox(2,20,79,24);
twolinebox(2,2,79,24);
center(4,"ADD RECORD");
printxy(6,8,"Student no: ");
printxy(6,10,"First Name: ");
printxy(6,12,"Last Name: ");
printxy(6,14,"Middle init:");
printxy(6,16,"Course code: ");
center(22,"Course code: [A]-L.D.S.C, [B]-for E.C.S, [any
key]-CompProg");
gotoxy(19,7);
}
void List(void){
int count=0,i,x=0,page=1,CS=0,IT=0,Serv=0;
fp=fopen("SRS.txt","r");
clrscr();
center(2,"Institute of Industrial Electronics
Engineering");
center(3,"NED University, Karachi");
center(5,"Introduction to Computer Engineering");
printxy(10,7,"Record
Student #
Name
Course");
for(i=1;i<80;i++){ gotoxy(i,8); puts(""); /*Alt-205*/ }
while(fscanf(fp,"%s %s %s %c
%c",&record.snum,&record.fname,&record.sname,&record.mi,&re
cord.ccode)!=EOF){
1915-1905 6
Student Record System in C
1915-1905 7
Student Record System in C
center(22,"Invalid Input!");
delay(1000);
nosound();
}
void main()
{
char choice;
first();
do{
clrscr();
twolinebox(29,6,51,8);
twolinebox(20,5,60,18);
twolinebox(2,20,79,25);
twolinebox(2,2,79,25);
center(7,"MAIN MENU");
printxy(30,9,"Press:");
printxy(30,11,"[A]-Create File");
printxy(30,12,"[B]-Add Record");
printxy(30,13,"[C]-List Record");
printxy(30,14,"[D]-Quit Program");
printxy(30,16,"Enter your choice..."); gotoxy(50,16);
choice=getch(); choice=toupper(choice);
switch(choice){
case 'A': Create (); break;
case 'B': Add
(); break;
case 'C': List
(); break;
case 'D': Quit
(); break;
default : Err_mess(); break;
}
}while(choice!='D');
}