Popular Posts

6/25/2012

School Management System In C Programming


Welcome to School Management system Using C Programming
Download Here
And the following code :
===========================================
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<dos.h>
struct student{
char id[10];
char name[20];
char sex;
int math,eng,khmer;
float avg;
char grade[10];
char DOB[20];
};
char getG(int score){

     if(score<50)
return 'F';
     else if(score<65)
return 'E';
     else if(score<75)
return 'D';
      else if(score<85)
return 'C';
      else if(score<95)
return 'B';
      else if(score<=100)
return 'A';
      else
return 'G';

}
void note(){
gotoxy(1,31);
textcolor(RED);
cprintf("Note:");
gotoxy(1,32);
printf("ÍÍÍÍ");

gotoxy(1,33);
textcolor(WHITE);
cprintf("'A' :Score<=100");
gotoxy(1,34);
cprintf("'B' :Score<95");
gotoxy(1,35);
cprintf("'C' :Score<85");
gotoxy(1,36);
cprintf("'D' :Score<75");
gotoxy(1,37);
cprintf("'E' :Score<65");
gotoxy(1,38);
cprintf("'F' :Score<50");
gotoxy(1,39);
cprintf("'G' :'No Grade'");
gotoxy(55,40);
textcolor(RED);
cprintf("Press 'Esc' to exit !!!"); }
void main(){
student stu[100],k;
int i,j=0,n=0,d,m;
char x[20],ch,st;
_setcursortype(_NOCURSOR);
do{
clrscr();
gotoxy(1,2);
textcolor(WHITE);
cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
gotoxy(1,3);
cprintf("º Group 5                             º");
gotoxy(1,4);
cprintf("º ßßßßßßß                             º");
gotoxy(1,5);
cprintf("º Topic : Control Student Information º");
gotoxy(1,6);
cprintf("º ßßßßß                               º");
gotoxy(1,7);
cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
gotoxy(20,15);
textcolor(YELLOW);
cprintf("Menu for Control All Student Information:");
gotoxy(20,16);
textcolor(RED);
cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ");
gotoxy(20,18);
textcolor(WHITE);
cprintf("ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»");
gotoxy(20,19);
cprintf("º                                       º");
gotoxy(20,20);
cprintf("º 1/ Input Student information          º");
gotoxy(20,21);
cprintf("º                                       º");
gotoxy(20,22);
cprintf("º 2/ Show Student information           º");
gotoxy(20,23);
cprintf("º                                       º");
gotoxy(20,24);
cprintf("º 3/ Show Transribe Student information º");
gotoxy(20,25);
cprintf("º                                       º");
gotoxy(20,26);
cprintf("º 4/ Delete Student information         º");
gotoxy(20,27);
cprintf("º                                       º");
gotoxy(20,28);
cprintf("º 5/ Edit Student information           º");
gotoxy(20,29);
cprintf("º                                       º");
gotoxy(20,30);
cprintf("º 6/ Exit Program                       º");
gotoxy(20,31);
cprintf("º                                       º");
gotoxy(20,32);
cprintf("ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
gotoxy(1,40);
textcolor(RED);
cprintf("Press Number(1-6) for Select Menu !!!");
ch=getch();
clrscr();
switch(ch){
case '1':
gotoxy(3,3);
textcolor(WHITE);
cprintf("Input number of Student= ");scanf("%d",&m);
 for(i=n;i<n+m;i++){
clrscr();
gotoxy(3,3);
textcolor(WHITE);
cprintf("Input Id= ");fflush(stdin);gets(stu[i].id);
gotoxy(3,4);
cprintf("Input Student Name= ");fflush(stdin);gets(stu[i].name);
gotoxy(3,5);
cprintf("Input Date of Birth= ");fflush(stdin);gets(stu[i].DOB);
gotoxy(3,6);
cprintf("Input Sex= ");scanf("%c",&stu[i].sex);
gotoxy(3,7);
cprintf("Input Math Score= ");scanf("%d",&stu[i].math);
gotoxy(3,8);
cprintf("Input English Score= ");scanf("%d",&stu[i].eng);
gotoxy(3,9);
cprintf("Input Khmer Score= ");scanf("%d",&stu[i].khmer);
stu[i].avg=(stu[i].math+stu[i].eng+stu[i].khmer)/3.0;
stu[i].grade[0]=getG(stu[i].math);
stu[i].grade[1]=getG(stu[i].khmer);
stu[i].grade[2]=getG(stu[i].eng);
stu[i].grade[3]=getG(stu[i].avg);
clrscr();
}n=n+m;
break;
case '2':
gotoxy(27,1);
textcolor(YELLOW);
cprintf("Show Student Information");
gotoxy(27,2);
textcolor(RED);
cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ");
gotoxy(1,4);
textcolor(WHITE);
cprintf("ÉÍÍÍÍËÍÍÍÍÍÍÍËÍÍÍËÍÍÍÍÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍÍÍ»");
gotoxy(1,5);
cprintf("º ID º  Name ºSexº   DOB  º Math º Grad º Kh º Grad º Eng º Grad º  Avg º Totalº");
gotoxy(1,6);
cprintf("ÌÍÍÍÍÎÍÍÍÍÍÍÍÎÍÍÍÎÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍ͹");
for(i=0;i<n;i++) {
gotoxy(1,7+(i*2)-1);
cprintf("ÌÍÍÍÍÎÍÍÍÍÍÍÍÎÍÍÍÎÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍ͹");
gotoxy(1,7+(i*2));
cprintf("º%4sº%7sº%3cº%8sº%6dº%6cº%4dº%6cº%5dº%6cº%6.2fº%6cº",stu[i].id,stu[i].name,stu[i].sex,stu[i].DOB,stu[i].math,stu[i].grade[0],stu[i].khmer,stu[i].grade[1],stu[i].eng,stu[i].grade[2],stu[i].avg,stu[i].grade[3]);
gotoxy(1,8+(i*2));
cprintf("ÈÍÍÍÍÊÍÍÍÍÍÍÍÊÍÍÍÊÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÍͼ");
}
note();
getch();break;
case '3':
clrscr();
gotoxy(3,3);
textcolor(WHITE);
cprintf("Please Input Student Name to Show= ");fflush(stdin);gets(x);
d=0;
clrscr();
gotoxy(27,1);
textcolor(YELLOW);
cprintf("Show Transcribe Student Information");
gotoxy(27,2);
textcolor(RED);
cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ\n\n");
gotoxy(1,4);
textcolor(WHITE);
cprintf("ÉÍÍÍÍËÍÍÍÍÍÍÍËÍÍÍËÍÍÍÍÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍÍÍËÍÍÍÍÍÍ»");
gotoxy(1,5);
cprintf("º ID º  Name ºSexº   DOB  º Math º Grad º Kh º Grad º Eng º Grad º  Avg º Totalº");
gotoxy(1,6);
cprintf("ÌÍÍÍÍÎÍÍÍÍÍÍÍÎÍÍÍÎÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍÍÎÍÍÍÍÍ͹");
gotoxy(1,7);
for(i=0;i<n;i++){
if(strcmp(stu[i].name,x)==0){
d=1;
textcolor(WHITE);
cprintf("º%4sº%7sº%3cº%8sº%6dº%6cº%4dº%6cº%5dº%6cº%6.2fº%6cº",stu[i].id,stu[i].name,stu[i].sex,stu[i].DOB,stu[i].math,stu[i].grade[0],stu[i].khmer,stu[i].grade[1],stu[i].eng,stu[i].grade[2],stu[i].avg,stu[i].grade[3]);
cprintf("ÈÍÍÍÍÊÍÍÍÍÍÍÍÊÍÍÍÊÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÍÍÊÍÍÍÍÍͼ");
}
}
note();
if(d==0){
clrscr();
gotoxy(2,2);
textcolor(WHITE);
cprintf("Student Name not found");
gotoxy(2,40);
textcolor(RED);
cprintf("Press 'Esc' to exit !!!");}
getch();break;
case '4':
do{ clrscr();
gotoxy(4,1);
textcolor(YELLOW);
cprintf("Please select your choice to Delete:");
gotoxy(4,2);
textcolor(WHITE);
cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ");
gotoxy(2,4);
cprintf("1/ Search by ID to Delete");
gotoxy(2,6);
cprintf("2/ Search by Name to Delete");
gotoxy(2,40);
textcolor(RED);
cprintf("Press Number(1 or 2) to Select Menu and 'Esc' to Exit !!!");
st=getch();
clrscr();
switch(st){
case'1':
clrscr();
gotoxy(4,1);
textcolor(WHITE);
cprintf("Please Input Id to Delete= ");fflush(stdin);gets(x);
j=0;
clrscr();
for(i=0;i<n;i++){
if(strcmp(stu[i].id,x)==0|| j==1)
{ j=1;
stu[i]=stu[i+1];
}
clrscr();
}
if(j==0){
gotoxy(2,2);
printf("Student ID not found");}
else{
gotoxy(2,2);
printf("Delete completed");n=n-1;
}
gotoxy(2,40);
textcolor(RED);
cprintf("Press 'Esc' to exit !!!");
getch();break;
case'2':
clrscr();
gotoxy(4,1);
textcolor(WHITE);
cprintf("Please Input Name to Delete= ");fflush(stdin);gets(x);
j=0;
clrscr();
for(i=0;i<n;i++){
if(strcmp(stu[i].name,x)==0|| j==1)
{ j=1;
stu[i]=stu[i+1];
}
clrscr();
}
if(j==0){
gotoxy(2,2);
textcolor(WHITE);
cprintf("Student Name not found");}
else{
gotoxy(2,2);
textcolor(WHITE);
printf("Delete completed");
n=n-1;
}
gotoxy(2,40);
textcolor(RED);
cprintf("Press 'Esc' to exit !!!");
getch();break;
  }
     }while(st!=27);     break;
case '5':
do{    clrscr();
gotoxy(4,1);
textcolor(YELLOW);
cprintf("Please select your choice to Edit:");
gotoxy(4,2);
textcolor(WHITE);
cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ");
gotoxy(2,4);
cprintf("1/ Search by ID to Edit");
gotoxy(2,6);
cprintf("2/ Search by Name to Edit");
gotoxy(2,40);
textcolor(RED);
cprintf("Press Number(1 or 2) to Select Menu and 'Esc' to Exit !!!");
st=getch();
clrscr();
switch(st){
case'1':
j=0;
gotoxy(4,1);
textcolor(WHITE);
cprintf("Please Input ID to Edit= ");fflush(stdin);gets(x);
for(i=0;i<n;i++){
if(strcmp(stu[i].id,x)==0){ j=1;
clrscr();
printf("Input Student Name= ");fflush(stdin);gets(stu[i].name);
printf("Input Sex= ");scanf("%c",&stu[i].sex);
printf("Input Date of Birth= ");fflush(stdin);gets(stu[i].DOB);
printf("Input Math Score= ");scanf("%d",&stu[i].math);
printf("Input English Score= ");scanf("%d",&stu[i].eng);
printf("Input Khmer Score= ");scanf("%d",&stu[i].khmer);
     stu[i].avg=(stu[i].math+stu[i].eng+stu[i].khmer)/3.0;
stu[i].grade[0]=getG(stu[i].math);
stu[i].grade[1]=getG(stu[i].khmer);
stu[i].grade[2]=getG(stu[i].eng);
stu[i].grade[3]=getG(stu[i].avg);
}
}
clrscr();
if(j==0){
gotoxy(2,2);
textcolor(WHITE);
cprintf("Student ID not found");}
else{
gotoxy(2,2);
textcolor(WHITE);
cprintf("Edit update completed");}
gotoxy(2,40);
textcolor(RED);
cprintf("Press 'Esc' exit !!!");
getch();break;
case'2':
j=0;
gotoxy(4,1);
textcolor(WHITE);
cprintf("Please Input Name to Edit= ");fflush(stdin);gets(x);
for(i=0;i<n;i++){
if(strcmp(stu[i].name,x)==0){ j=1;
clrscr();
printf("Input Student ID= ");fflush(stdin);gets(stu[i].id);
printf("Input Sex= ");scanf("%c",&stu[i].sex);
printf("Input Date of Birth= ");fflush(stdin);gets(stu[i].DOB);
printf("Input Math Score= ");scanf("%d",&stu[i].math);
printf("Input English Score= ");scanf("%d",&stu[i].eng);
printf("Input Khmer Score= ");scanf("%d",&stu[i].khmer);
     stu[i].avg=(stu[i].math+stu[i].eng+stu[i].khmer)/3.0;
stu[i].grade[0]=getG(stu[i].math);
stu[i].grade[1]=getG(stu[i].khmer);
stu[i].grade[2]=getG(stu[i].eng);
stu[i].grade[3]=getG(stu[i].avg);
}
}
clrscr();
if(j==0) {
gotoxy(2,2);
textcolor(WHITE);
cprintf("Student Name not found");}
else{
gotoxy(2,2);
textcolor(WHITE);
cprintf("Edit update completed");
}
gotoxy(2,40);
textcolor(RED);
cprintf("Press 'Esc' to exit !!!");
getch();break;     }
  }while(st!=27);   break;
}
}while(ch!=27 && ch!='6');
}

3 comments:

  1. The program is so huge . I found so many errors while running it .
    School management system

    ReplyDelete
  2. Before I upload it I make sure that code has no error. Download it again and run it in Turbo C.

    ReplyDelete
  3. The school management system also has the ability to send messages to the safe and secure parent and student portal so when students logged in to enroll, they could take care of business before going through the registration line during registration week such as pay for lost text and library books which can be a huge savings for schools.

    ReplyDelete