c语言成绩查询系统大作业,C语言成绩查询系统源代码

原标题:C语言成绩查询系统源代码

在工作学习中,我们经常会遇到C语言成绩查询系统源代码

这样的问题。鲁迅先生说过:伟大的成绩和辛勤劳动是成正比例的,有一分劳动就有一分收获,日积月累,从少到多,奇迹就可以创造出来因此,面对C语言成绩查询系统源代码

我们应该有努力探索的精神。读书对于智慧,就像体操对于身体一样。对于这个问题也是一样的。读书忌死读,死读钻牛角,对于C语言成绩查询系统源代码

我们一定要从不同角度去理解,只有这样才能找到解决办法。鲁迅先生说过:伟大的成绩和辛勤劳动是成正比例的,有一分劳动就有一分收获,日积月累,从少到多,奇迹就可以创造出来

学生成绩管理系统

67e8b84492a02e826b8ff7bffbd94bdf.png

向您推荐老师必备工具“易查分”,她是一个在线工具,它的功能是将Excel电子表格文件转换成在线查询网页,不仅能查询,在查询后还可以修改老师设置的可修改列,达到查询、核对、填表的功能;百度“易查分”即可

#include"stdio.h"

#include"stddef.h"

#include"stddef.h"

#include"string.h"

#define MAX 10

typedef struct student {

char name[MAX];

int num[MAX];

char sex[MAX];

int chinese;

int mathematic;

int english;

int computer;

struct student *next;

} stu;

stu *head;

void print() {

system("cls");

printf("\t\t\tScore Manage System\n");

printf("<1>Enter Record\t");

printf("<2>Display\t");

printf("<3>Insert\t");

printf("<4>Quest\t");

printf("<5>Update\t");

printf("<6>Save\t");

printf("<7>Fresh\t");

printf("<8>Chinese Average\t");

printf("<9>Math Average\t");

printf("<10>English Average\t");

printf("<11>Computer Average\t");

printf("<12>Quit\t\n");

}

void cin(stu *p1) {

printf("Enter name:\n");

scanf("%s", &p1->name);

printf("Enter num:\n");

scanf("%d", &p1->num);

printf("Enter sex:\n");

scanf("%s", &p1->sex);

printf("Enter score:\n");

printf("Enter chinese:\n");

scanf("%d", &p1->chinese);

printf("Enter math:\n");

scanf("%d", &p1->mathematic);

printf("Enter English:\n");

scanf("%d", &p1->english);

printf("Enter Computer:\n");

scanf("%d", &p1->computer);

}

stu *cindata() {

stu *p1. *p2;

int i = 1;

char ch;

p1 = (stu *)malloc(sizeof(stu));

head = p1;

while(i) {

cin(p1);

printf("Do you Want to Continue?yes or no");

ch = getchar();

ch = getchar();

if(ch == 'n' || ch == 'N') {

i = 0;

p1->next = NULL;

} else {

p2 = p1;

p1 = (stu *)malloc(sizeof(stu));

p2->next = p1;

}

}

return(p1->next);

}

void lookdata(stu *p1) {

while(p1 != NULL) {

printf("Num:%d\t", p1->num);

printf("Name:%s\t", p1->name);

printf("Sex:%s\t", p1->sex);

printf("\n");

printf("Chinese:%d\t", p1->chinese);

printf("Math:%d\t", p1->mathematic);

printf("English:%d\t", p1->english);

printf("Computer:%d\t", p1->computer);

printf("\n");

p1 = p1->next;

}

}

void insert(stu *p2) {

stu *p1. *p3;

char ch;

int i = 1;

p3 = (stu *)malloc(sizeof(stu));

p1 = p2;

while(i) {

cin(p3);

printf("Enter again?yes or no");

ch = getchar();

ch = getchar();

if(ch == 'n' || ch == 'N') {

i = 0;

p3->next = NULL;

} else {

while(p1 != NULL)

p1 = p1->next;

p3 = (stu *)malloc(sizeof(stu));

p1->next = p3;

}

}

}

find(stu *p2) {

char name[20];

int b = 0;

printf("Enter the name of the student you want to find:");

scanf("%s", name);

while(p2 != NULL) {

if(strcmp(name, p2->name) == 0) {

printf("The data you want has be found\n");

printf(" Name:%s\t", p2->name);

printf("Num:%d\t", p2->num);

printf("sex%s\t", p2->sex);

printf("\n");

printf("Chinese:%d\t", p2->chinese);

printf("Math:%d\t", p2->mathematic);

printf("English:%d\t", p2->english);

printf("Computer:%d\t", p2->computer);

printf("\n");

b = 1;

} else if(b == 0)

printf("对不起,没有找到你要找的数据");

p2 = p2->next;

}

if(b == 1) {

print();

printf("Find one\n");

} else {

print();

printf("Not find\n");

}

}

void caverage(stu *p2) {

stu *p1;

int i;

float max = 0.0. min = 200.0;

float sum = 0.0. aver = 0;

p1 = p2;

if(p1 == NULL)

printf("not data!");

else

for(i = 0; p1 != NULL; i++, p1 = p1->next)

sum += p1->chinese;

aver /= i;

for(i = 0; p1 != NULL; i++, p1 = p1->next)

if(max < p1->chinese)

max = p1->chinese;

for(i = 0; p1 != NULL; i++, p1 = p1->next)

if(min < p1->chinese)

min = p1->chinese;

printf("Chinese Average:%f", aver);

printf("Chinese Max:%f", max);

printf("Chinese Min:%f", min);

}

void maverage(stu *p2) {

stu *p1;

int i;

float max = 0.0. min = 200.0;

float sum = 0.0. aver = 0;

p1 = p2;

if(p1 == NULL)

printf("not data!");

else

for(i = 0; p1 != NULL; i++, p1 = p1->next)

sum += p1->mathematic;

aver /= i;

for(i = 0; p1 != NULL; i++, p1 = p1->next)

if(max < p1->mathematic)

max = p1->mathematic;

for(i = 0; p1 != NULL; i++, p1 = p1->next)

if(min < p1->mathematic)

min = p1->mathematic;

printf("Math Average:%f", aver);

printf("Math Max:%f", max);

printf("Math Min:%f", min);

}

void eaverage(stu *p2) {

stu *p1;

int i;

float max = 0.0. min = 200.0;

float sum = 0.0. aver = 0;

p1 = p2;

if(p1 == NULL)

printf("not data!");

else

for(i = 0; p1 != NULL; i++, p1 = p1->next)

sum += p1->english;

aver /= i;

for(i = 0; p1 != NULL; i++, p1 = p1->next)

if(max < p1->english)

max = p1->english;

for(i = 0; p1 != NULL; i++, p1 = p1->next)

if(min < p1->english)

min = p1->english;

printf("English avergre:%f", aver);

printf("English Max:%f", max);

printf("English Min:%f", min);

}

void comaverage(stu *p2) {

stu *p1;

int i;

float max = 0.0. min = 200.0;

float sum = 0.0. aver = 0;

p1 = p2;

if(p1 == NULL)

printf("not data!");

else

for(i = 0; p1 != NULL; i++, p1 = p1->next)

sum += p1->computer;

aver /= i;

for(i = 0; p1 != NULL; i++, p1 = p1->next)

if(max < p1->computer)

max = p1->computer;

for(i = 0; p1 != NULL; i++, p1 = p1->next)

if(min < p1->computer)

min = p1->computer;

printf("Computer Averger:%f", aver);

printf("Computer Max:%f", max);

printf("Computer Min:%f", min);

}

update(stu *p2) {

char name[10];

int b = 0;

printf("Enter The Name");

scanf("%s", name);

while(p2 != NULL) {

if(strcmp(name, p2->name) == 0) {

printf("Find you data\n");

scanf("Name:%s", p2->name);

scanf("Num:%s", p2->num);

scanf("Sex:%s", p2->sex);

scanf("Chinese:%d", p2->chinese);

scanf("Math:%d", p2->mathematic);

scanf("english:%d", p2->english);

scanf("Computer:%d", p2->computer);

printf("Success!");

b = 1;

} else if(b == 0)

printf("Sorry not Find data!");

p2 = p2->next;

}

if(b == 0) {

print();

printf("Sorry not Find data!");

} else {

print();

printf("Finish!");

}

}

save(stu *p2) {

FILE *fp;

char file[10];

printf("Enter file name");

scanf("%s", file);

fp = fopen(file, "w");

while(p2 != NULL) {

fprintf(fp, "%s", p2->name);

fprintf(fp, "%s", p2->num);

fprintf(fp, "%s", p2->sex);

fprintf(fp, "%d", p2->chinese);

fprintf(fp, "%d", p2->mathematic);

fprintf(fp, "%d", p2->english);

fprintf(fp, "%d", p2->computer);

p2 = p2->next;

}

fclose(fp);

}

char password[7] = "123456";

void main() {

int choice;

stu *p2;

char s[8];

int flag = 0. i;

int n = 3;

do {

printf("Enter password:\n");

scanf("%s", s);

if(!strcmp(s, password)) {

printf("PASS\n\n\n");

flag = 1;

break;

} else {

printf("Error Enter again:\n");

n--;

}

} while(n > 0);

if(!flag) {

printf("you have Enter 3 times!");

exit(0);

}

printf("~~~~~~~~~~\t\t\t~~~~~~~~~~~~\n");

printf("\t\tWelcom to the Mis\n");

printf("Author:-----\tClass:------\tNum:------\n");

printf("Adress:HG\n");

printf("%%%%%%%%%%%%%%%%%%%%%%%%%%%\n");

printf("\t\tEnter OP:\n");

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

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

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

printf("\t\tEnter the MIS yes or no\n");

scanf("%d", &choice);

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

exit(1);

print();

while(1) {

printf("Enter choice:");

scanf("%d", &i);

if(i < 1 || i > 8) {

printf("Enter num from 1 to 8:\n");

exit(1);

}

switch(i) {

case 1:

p2 = cindata();

break;

case 2:

lookdata(head);

break;

case 3:

insert(p2);

break;

case 4:

find(head);

break;

case 5:

update(head);

break;

case 6:

save(head);

break;

case 7:

print();

break;

case 8:

caverage(head);

break;

case 9:

maverage(head);

break;

case 10:

eaverage(head);

break;

case 11:

comaverage(head);

break;

case 12:

;

case 13:

exit(1);

break;

}

scanf("%d", &i);

}

}

以上就是小编对于C语言成绩查询系统源代码的介绍,不知道是否解决了您的问题,欢迎给我留言就C语言成绩查询系统源代码与我讨论。返回搜狐,查看更多

责任编辑:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
学生成绩查询系统是一个基于C语言开发的程序,通过该系统,学生和教师可以方便地查询学生成绩信息。系统源代码包括以下几个主要部分: 1. 用户登录:学生和教师可以通过输入用户名和密码登录系统系统将验证用户信息并允许合法用户进入系统。 2. 成绩查询:学生可以输入自己的学号在系统查询相关课程的成绩,教师可以输入学生的学号查询该学生的成绩,并可以对成绩进行修改。 3. 成绩管理:教师可以添加新的成绩信息,删除错误的成绩记录,更新学生的成绩信息等操作。 4. 数据存储:系统需要设计合理的数据结构来存储学生成绩信息,可以使用数组、链表或者文件来存储学生的成绩记录。 5. 用户界面:系统需要有友好的用户界面,方便用户进行操作。可以使用文本界面或者图形界面。 整个系统源代码需要考虑到系统的安全性,稳定性和高效性,例如对用户输入进行合法性检查,防止因非法输入导致的系统崩溃或者信息泄露。还需要考虑到系统的扩展性和灵活性,方便未来对系统进行进一步的改进和升级。 学生成绩查询系统源代码主要是通过C语言实现,通过对文件操作,条件判断,循环结构等C语言知识的灵活运用,来实现系统的各项功能。另外,可以结合一些C语言的库函数,如输入输出函数、字符串处理函数等,来简化代码的编写和提高代码的可读性。在编写代码的过程中,还需要考虑到代码的模块化和重用性,让代码结构清晰,便于维护和扩展。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值