您的位置 电脑知识爱好者 >> 编程知识 >> 用c++编程!学生考试成绩分析系统

用c++编程!学生考试成绩分析系统

电脑知识爱好者互联网本站整理2007-8-26 22:15:08
知识重点:学生的信息(学号,姓名,数学,外语,计算机课程的成绩) 能够输入若干学生的信息及其成绩 统计成绩stdio.h #include string.h #define MAXNUM 35 /* 最大记录数*/ #define MAXCLASS 3 /* 课程..

for ( i=0; i<5; i++ )

printf ("%8d",each[i] );

printf ("\n ======================================== \n " );

}

void DeleteData(void)

{

char id[16];

char delnext;

printf ("====== 删除数据=====\n");

do

{

printf ("请输入学号:\n");

scanf("%s",id);

DelRecord(id);

getchar();

printf ("是否继续删除?(y/n):y)");

scanf ("%c",&delnext );

if ( delnext == 'n' || delnext == 'N' )

break;

else

continue;

}

while ( nCurrent > 0 );

}

void DelRecord(char *p)

{

int index = SearchByID(p);

if ( index == - 1 )

{

printf ("未找到要删除学号!");

return;

}

int i;

for ( i=index; i<nCurrent-1; i++ )

stu[i] = stu[i+1];

nCurrent--;

printf ("删除学号为:%s 的数据成功!\n",p);

}

void InsertData(void)

{

struct Student temp;

char insertnext;

printf ("====插入数据=====\n");

do

{

if ( nCurrent == MAXNUM )

{

printf (" full ! ");

return;

}

printf ("学号=");

scanf ("%s",temp.id);

printf ("姓名=");

scanf ("%s",temp.name );

printf ("英语=");

scanf ("%d",&temp.score[0] );

参与评论
相关内容
关于我们 | 隐私政策 | 站点地图 | 站长博客|京ICP备07025396号
添加到百度搜藏 添加到百度搜藏 电脑知识爱好者Copyright ?2006-2008版权所有 我要啦免费统计