用c++编程!学生考试成绩分析系统
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] );
参与评论- 相关内容
- 最近更新
- ·数据结构实验问题
- ·怎么才能学好编程
- ·求素數為什么會出現負數
- ·已知小写字母m的十进制的ASCll码..
- ·c语言交流
- ·C语言练习题
- ·一道C语言编程题...我觉得好难哦..
- ·ox005c0268指令引用ox00000064内..
- ·为什么会输出这样的结果?
- ·求解一道运用C语言的问题
添加到百度搜藏