c语言学生选课系统(国外英文资料)
c语言学生选课系统(国外英文资料)
# include < stdio, h >
# include < string. H >
# include < stdlib. H >
Struct stu
{
Int num.
Char name [20].
Char kind [20].
Int lhours;
Int rhours;
Int crdit;
Int score;
Int term;
} [1000] s, t;
Int input (struct)
(struct stu s []);
Void output (struct).
(struct stu s [], int n, int search_score);
Int seqsearch2 (struct stu s [], int n, char search_name []);
Void seqinsert.
Void seqdelete.
(struct stu, int n);
Void sort.
Void save.
Void main ()
{
Int sel, choice;
Int n.
Int search_score;
Char search_name [20].
Char message [] = {" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
", "" "
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * welcome to use the xi 'an university of science and technology for the selection of course system.
"This system is a student selection system, and you can implement \ n in this system."
"Input to the course information, browse, find, deposit, delete, modify, \ n"
Sort, save and so on.
Char menu []
"88888888888888888888888888888888888888888888888888 \ n"
"* 1. Input course information \ n"
"* 2. Browsing course information \ n"
"* 3. Find the course information \ n"
"* 4. Insert the course information \ n"
"* 5. Delete course information \ n"
"* 6. Change course information \ n"
"* 7. Course information sorting \ n"
"* 8. Save \ n"
"* 9. Quit \ n"
"88888888888888888888888888888888888888888888888888 \ n"};
Printf (" % s ", message);
The do
{
Printf (" % s ", menu);
Printf (" please select \ n "in 1-9);Scanf (" % d ", & sel);
The switch (sel)
{
Case 1:
Printf (" 1 - keyboard input \ n ");
Printf (" 2-file load \ n ");
Printf (" choose 1 or 2 \ n ");
Scanf (" % d ", & choice);
The switch (choice)
{
Case 1:
N = input (s);
Break;
Case 2:
N = openfile (s);
Break;
}
Break;
Case 2:
The output (s, n);
Break;
Case 3:
The do
{
Printf (" 1, "-- -- -- -- -- -- -- -- -- --
Printf (" 2 -- -- -- --