• 大小: 554KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-09
  • 语言: 其他
  • 标签: C语言  

资源简介

这是一个管理系统,实现教师信息和学生的成绩管理

资源截图

代码片段和文件信息

#include “tea_stu.h“

void welcome(){
printf(“\t*************************************************************\n“); 
printf(“\t\t\t\t**教师信息管理/学生成绩管理系统**\n\t\t\t\t  欢迎使用!\n“); 
printf(“\t*************************************************************\n“); 

}
int menu_select_tea()
{
char c;
printf(“0.Exit the system\n1.See teacher record\n2.Add teacher record\n3.Adjust teacher record\n5.Find teacher record\n4.Open the file\n“);
printf(“please input 1-5 to select related function or 0 to exit!!!\n“);
c=getchar();
getchar();
return(c-‘0‘);
}

void add_tea(Teacher tea[]) 

int i=0jnum; 
char str[5]; 
if(numtea!=0) 

printf(“cover the current record?(y/n)\n“); 
gets(str); 
if(str[0]==‘Y‘||str[0]==‘y‘) 
i=0; 
else i=numtea; 


printf(“Please input the number of you add the teachers:“); 
scanf(“%d“&num); 
if(i==0) 
numtea=num; 
else numtea+=num; 
if(numtea>lens) 

lens+=10; 
tea=(Teacher *)realloc(tealens*SIZE); 

printf(“Please input the teacher‘s info:\n“); 
for(;i
getchar(); 
printf(“please input the teacher‘s NO.:“); 
gets(tea[i].number); 
printf(“please input the teacher‘s name:“); 
gets(tea[i].name); 
printf(“please input the teacher‘s sex(man/woman 0/1):“); 
gets(tea[i].sex); 
if(tea[i].sex[0]==‘0‘) strcpy(tea[i].sex“man“); 
else strcpy(tea[i].sex“woman“); 
printf(“please input the teacher‘s address:“); 
gets(tea[i].addr); 
printf(“the teacher is married(No/Yes 0/1):“); 
gets(tea[i].married); 
if(tea[i].sex[0]==‘0‘) strcpy(tea[i].sex“No“); 
else strcpy(tea[i].sex“Yes“); 

display_tea(tea0numtea-1); 
getchar(); 
}
void display_tea(Teacher tea[]int n1int n2) 

int i;
char str[2];
if(numtea==0){
       printf(“There is Nothing!\n“);
   printf(“Do you want to open some file to find the record?(Y/N)\n“);
   gets(str);
   if (str[0]==‘Y‘||str[0]==‘y‘)
   {
   openfileTXT(tea);
   }
   else
   {
   return;
   }
}
else
{
for(i=n1;i<=n2;i++) 
printf(“number:%s\tname:%s\t\tsex:%s\t\taddr:%s\t\tmarried:%s\t“tea[i].numbertea[i].nametea[i].sextea[i].addrtea[i].married); 
}

void adjust(Teacher tea[]) 

char str[5]; 
int i=-1j; 

if(numtea==0) 
{
printf(“there is nothing !!!\n“); 
return;
}
while(i<0) 

i=find_tea(tea); 
if(i>=0) 

printf(“Delete it?(y/n)“); 
gets(str); 
if(str[0]==‘y‘||str[0]==‘Y‘) 

delete_tea(teai); 
/*count(stud); */

else 

printf(“Adjust it?(y/n)“); 
gets(str); 
if(str[0]==‘y‘||str[0]==‘Y‘) 


printf(“Please input something you want:\n“); 
printf(“please input the teacher‘s NO.:“); 
gets(tea[i].number); 
printf(“please input the teacher‘s name:“); 
gets(tea[i].name); 
printf(“please input the teacher‘s sex(man/woman 0/1):“); 
gets(tea[i].sex); 
if(tea[i].s

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      57856  2013-03-28 15:15  Teacher_Student_Manager\Debug\Teacher_Student_Manager.exe

     文件     311172  2013-03-28 15:15  Teacher_Student_Manager\Debug\Teacher_Student_Manager.ilk

     文件     502784  2013-03-28 15:15  Teacher_Student_Manager\Debug\Teacher_Student_Manager.pdb

     文件         20  2013-03-28 14:32  Teacher_Student_Manager\Teacher_Student_Manager\bz.txt

     文件        886  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\cl.command.1.tlog

     文件       2216  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\CL.read.1.tlog

     文件        752  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\CL.write.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link-cvtres.read.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link-cvtres.write.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link-rc.read.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link-rc.write.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.4120-cvtres.read.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.4120-cvtres.write.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.4120-rc.read.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.4120-rc.write.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.4120.read.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.4120.write.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.5820-cvtres.read.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.5820-cvtres.write.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.5820-rc.read.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.5820-rc.write.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.5820.read.1.tlog

     文件          2  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.5820.write.1.tlog

     文件       1678  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.command.1.tlog

     文件       2450  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.read.1.tlog

     文件        980  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\link.write.1.tlog

     文件        775  2013-03-28 09:03  Teacher_Student_Manager\Teacher_Student_Manager\Debug\Teacher_Student_Manager.Build.CppClean.log

     文件        118  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\Teacher_Student_Manager.lastbuildstate

     文件      38507  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\Teacher_Student_Manager.log

     文件      91354  2013-03-28 15:15  Teacher_Student_Manager\Teacher_Student_Manager\Debug\tea_stu.obj

............此处省略17个文件信息

评论

共有 条评论