当前位置:网站首页>Using C language to compile student achievement management system (C language student achievement management system deleted)
Using C language to compile student achievement management system (C language student achievement management system deleted)
2022-07-28 11:24:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
One 、 Course design topic
① Basic requirements topic : Matrix multiplication .
② Comprehensive training : Student achievement management system
Two 、 The design requirements
Matrix multiplication : Write a function implementation matrix A(2 That's ok 3 Column ) And matrix B
Multiply (3 That's ok 2 Column ), Product on C Array . Enter two arrays multiplied in the main function , And output the result .
Student achievement management :( Array of structs 、 function 、 The pointer 、 Algorithm 、 Comprehensive application of process structure and documents )
Program description : Yes N A student , The data of each student contains the student number ( No repetition )、 full name 、 The grades and average grades of the three courses , Try to design a student achievement management system , It can provide the following functions :
Student achievement management system
1、 Score entry
2、 Score inquiry
3、 Score statistics
4、 refund Out
(1) The main menu
(2) Functions of each menu item
① Score entry : Enter the student number 、 Name and grades of three courses ;
② Score inquiry :( At least one query method ).
v Query student records by student number .
v Check the records of failed students .
③ Score statistics :
v Calculate the average score of students ;
v According to the average score of students , Sort the students' data and output ;
v Sort the students' grades in a single subject , Output the student's name and the grade of the subject ;
④ Exit the system : Exit the whole system ( Main menu ).
(3) Array of structs :
#define N 30
struct student
{int
num;
char
name[20];
float score[3];
float
average;
};struct student stu[N];
3、 ... and 、 Data structure design description
System function description
1 Be able to input the student number 、 full name 、 Three grades and calculate the average score .
2 Be able to output student records in the form of tables
3 Be able to sort according to the average scores of students in three subjects
4 Be able to sort according to students' single subject scores
5 Be able to query student records according to student number
6 Insert student records into the table
7 Delete student records from the table
8 Store records in files
9 Read records from files
10 sign out
The data dictionary
1 data flow
Data stream name : All records
Alias : nothing
sketch : All the records about students' grades after the latest update
source : database
Whereabouts : machining “ Record screening ”
Data traffic : There is no limit
form : Student number + full name +SC1+SC2+SC3+ Average score
Data storage bar
Data store name : Student record
Alias : nothing
sketch : Store all information available to students
form : Student number + full name +SC1+SC2+SC3+ Average score
Organization : Index file , Take the student number as the keyword
Query requirements : It is required to inquire immediately
2 Data item entry
Data item name : Student number
Alias : nothing
sketch : Student numbers of all school students
type : character string
3 Processing items
Processing name : Changed records
Excitation conditions : The student record has been changed
priority : Ordinary
Input : New record
Output : Update data 、 Data unchanged
Processing logic : According to the existing student record
if New record <> Old record
then Update data
else Data unchanged
endif
Design test process
1、 Enter interface
2、 Input options 0, enter ;
Enter data as prompted
3、 Back to the main menu ;
Input options 8, enter ;
Input file name :data, enter ;
A success message appears , Then the read file operation succeeds .
4、 Back to the main menu , Input 1, enter
Every time 10 Pause display data
5、 Back to the main menu , Input 2, enter
The sorting success message appears .
6、 Back to the main menu , Input 3, enter
The sorting success message appears .
7、 Back to the main menu , Input 5, enter
Insert a set of data as prompted
8、 Back to the main menu , Input 6, enter
Press the prompt to enter a name , Delete data
The message of successful deletion appears
9、 Back to the main menu , Input 4, enter
Enter the student number to query
10、 Back to the main menu , Input 1, enter
Statistics appear
11、 Back to the main menu , Input 7, enter
Input result, enter
The message that the file was successfully written appears
12、 Back to the main menu , Input 9, Press enter to exit the system
Four 、 Definition and function of each variable
#define N 3 Defining constants
typedef struct z1 Define the data structure
{ char no[11];
char name[15];
int score[N];
float sum;
float average;
int order;
struct z1 *next;
}STUDENT;
char *menu[] Define the menu string array
Enter list Input record
Print list Display all records in the single linked list
Sort to make new file Sort according to the total score
sort to Single course result Sort according to the scores of single subjects
Search record on ID Search the record according to the student number
Insert record to list Insert record into table
Delete a record from list Delete a record from a table
Save the file Save the records in the single linked list to a file
Load the file Read records from files */
Quit sign out
STUDENT *init() Initialize linked list
STUDENT *create() Create a linked list , Complete the data entry function
inputs(char *prompt, char *s, int count) Custom input control function inputs
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/128282.html Link to the original text :https://javaforall.cn
边栏推荐
- A solution to the problem that ThinkPad fingerprint verification cannot be used in win7
- Two point, three point, 01 point plan [bullet I]
- Offsetof macro and container_ Of macro analysis details
- Why should coding and modulation be carried out before transmission
- Leetcode:981. time based key value storage [trap of iteration for: on]
- What is WordPress
- 【Gradle】This version of the JMH Gradle plugin requires Gradle 6+, you are using 6.6.
- vim命令下显示行号[通俗易懂]
- Picture slide effect
- What is WordPress
猜你喜欢

为什么传输前要进行编码与调制

Sword finger offer 06. print linked list from end to end

不用Swagger,那我用啥?

Game theory 1. Introduction (basic concepts of combination games, confrontation search, bash games, Nim games)
Microsoft security team found an Austrian company that used windows Zero Day vulnerability to sell spyware

I use the applet container to improve the efficiency of mobile R & D by 5 times!
![[JS advanced] JS functions, overloads, anonymous functions, scopes and scope chains_ 03](/img/50/754f7915ee4b2e04fdd21ae68130c6.png)
[JS advanced] JS functions, overloads, anonymous functions, scopes and scope chains_ 03

融云 IM & RTC 能力上新盘点

ZBrush 2022软件安装包下载及安装教程

18张图,直观理解神经网络、流形和拓扑
随机推荐
Sword finger offer 06. print linked list from end to end
DHCP实验演示(Huawei交换机设备配置)
2021-03-24
用 ZEGO Avatar 做一个虚拟人|虚拟主播直播解决方案
Related concepts of several databases
2021-03-24
WinForm generates random verification code
Combination of const and pointer
Two dimensional prefix and
为什么传输前要进行编码与调制
vim命令下显示行号[通俗易懂]
Cortex-M内核管理全局中断的三种方式
小水滴2.0网站导航网模板
RHEL 6.4 安装svn和apache
Build a quick development ide: visualsvn + sublime + Visual Studio 2013 + quickeasyftpserver
What's the secret of creating a popular short video?
微软安全团队发现一家利用Windows零日漏洞销售间谍软件的奥地利公司
Jianzhi offer 09. realize queue with two stacks
分体式测斜探头安装要点及注意事项
c语言实现float型数据转成BCD数据