完成学生信息系统的项目开发,要求实现学生信息的录入、查询、修改、排序和统计等主要功能。

来源:百度知道 编辑:UC知道 时间:2024/09/23 09:12:25
用C语言实现啊

用数组 指针来实现~~
完成好的追加分啊.......
这两天有效
完成可发到我邮箱:no._23@163.com
111.obj - 1 error(s), 0 warning(s)

已经编译运行通过:

#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "conio.h"

struct subject{ //科目信息结构体
float Chinese; //语文
float Math; //数学
float English; //英语
};

struct student{
int no; //学号
char name[20]; //姓名
char sex; //性别
char address[20]; //地址
char telephone[20];//电话
subject score; //3门科目的成绩
float avg; //3门平均成绩
}stud[50]; //结构体数组

int count=0; //计数变量,记录学生人数

void add(){ //增加学生信息函数
student a; //临时结构体变量a
char x,j; //Yes or No输入字符变量

//循环输入学生信息
for(int i=0;i<50;i++){
system("cls"); //清屏函数
int t=0;
printf("请输入学生的学号:");
scanf("%d",&a.no);

//寻找学号是否已存在
for(int k=0;k<count;k++){
if(stud[k].no==a.no){
t=1;
}
}

//存在与否,分别输出
if(t==1)
printf(&