学生管理系统

学生管理系统

c#

*学生管理系统*/
#include<stdio.h>
#include<string.h>//包含头文件string.h
#define MAX 60//定义MAX最大值为60 
struct student{
    char name[20];
    int age;
    int id;
    char sex[10];
};

struct class_room{
    struct student st[MAX];    //定义多个学生 
    int n;    //当前班级的人数
};

void printf_menu()//打印主菜单函数 
{
    printf("        学生管理系统        \n");
    printf("----------------------------\n");
    printf("|1、添加学生信息            |\n");
    printf("|2、显示所有学生信息        |\n");
    printf("|3、查询学生信息            |\n");
    printf("|4、删除学生信息            |\n");
    printf("|5、修改学生信息            |\n");
    printf("|6、退出                    |\n");
    printf("----------------------------\n");
    printf("请输入相应的序号选择!       \n");
}

void add_student(struct class_room *WLW)//添加学生信息,其中struct class_room *WLW为结构体指针 
{
    printf("请输入学生的姓名:\n");
    scanf("%s",WLW->st[WLW->n].name);    //数组名代表首地址 
    printf("请输入学生的年龄:\n");
    scanf("%d",&am

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值