91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 7KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-04
  • 語言: C/C++
  • 標(biāo)簽: 管理系統(tǒng)??

資源簡介

用c語言編寫的關(guān)于教師工作量系統(tǒng)的程序設(shè)計(jì)

資源截圖

代碼片段和文件信息

#include?	
#include?
#include?
#include?
#include?
#define?MAX_NAME?20????
#define?NULL?0

struct?course
{
char?course_name[MAX_NAME];
int?class_num;
int?ch_per;
int?ex_per;
struct?course?*next;
};

struct?teacher
{
char?teacher_num[MAX_NAME];
char?teacher_name[MAX_NAME];
struct?teacher?*next;
struct?course?*chead;
struct?course?*ctail;
};

struct?teacher?*thead*ttail*found;

//***********************************************************************
//主菜單
void?menu()
{
system(“cls“);
printf(“*************************************\n“);
printf(“*??1.輸入教師信息???????????????????*\n“);
printf(“*??2.插入授課信息???????????????????*\n“);
printf(“*??3.工作量計(jì)算與顯示???????????????*\n“);
printf(“*??4.退出???????????????????????????*\n“);
printf(“*************************************\n“);
printf(“請輸入要操作的序號:“);
}

int?isExist(char?number[])??//判斷輸入的教師號是否已經(jīng)存在
{
struct?teacher?*p;
p=thead;
while(p!=NULL?&&?(strcmp(p->teacher_numnumber)!=0))?p=p->next;
found=p;
if(p==NULL)?
return?0;
else
return?1;
}

//************************************************************************
//增加教師教學(xué)信息模塊
void?addIn()
{
struct?teacher?*p;
struct?course?*pcourse;
char?teacher_num[MAX_NAME];
char?teacher_name[MAX_NAME];
char?course_name[MAX_NAME];
int?class_num;
int?ch_per;
int?ex_per;
while(1)
{
system(“cls“);

printf(“****************************************************\n“);
printf(“*?????輸入教師的信息,以輸入教師號為#結(jié)束輸入??????*\n“);
printf(“****************************************************\n“);
printf(“輸入教師號:“);
fflush(stdin);
scanf(“%s“teacher_num);
if(isExist(teacher_num))
{
printf(“!!!該教師號已經(jīng)存在,請重新輸入。\n按任意鍵重新輸入...\n“);
getch();
}
else
{
if(strcmp(teacher_num“#“)==0)
{
printf(“**************************************************\n“);
printf(“輸入結(jié)束。按任意鍵返回主菜單...\n“);
getch();
return;
}
printf(“輸入教師姓名:“);fflush(stdin);scanf(“%s“teacher_name);

printf(“****************************************************\n“);
printf(“*?????????????????輸入教師授課信息?????????????????*\n“);
printf(“****************************************************\n“);
printf(“輸入課程名稱:“);fflush(stdin);scanf(“%s“course_name);
printf(“輸入班級數(shù)目:“);fflush(stdin);scanf(“%d“&class_num);
printf(“輸入理論課時(shí):“);fflush(stdin);scanf(“%d“&ch_per);
printf(“輸入實(shí)驗(yàn)課時(shí):“);fflush(stdin);scanf(“%d“&ex_per);
pcourse=(struct?course?*)malloc(sizeof(struct?course));
strcpy(pcourse->course_namecourse_name);
pcourse->class_num=class_num;
pcourse->ch_per=ch_per;
pcourse->ex_per=ex_per;
pcourse->next=NULL;

p=(struct?teacher?*)malloc(sizeof(struct?teacher));
strcpy(p->teacher_numteacher_num);
strcpy(p->teacher_nameteacher_name);
p->chead=pcourse;
p->ctail=pcourse;
if(thead==NULL)
{
thead=p;
ttail=p;
}
else
{
ttail->next=p;
tta

評論

共有 條評論

相關(guān)資源