資源簡介
為了做課程設計而編寫的一個簡單的學生成績管理系統,拿上來給分享一下。高手的指點一下,飄過就好。。。。。
代碼片段和文件信息
//?課程設計.cpp?:?Defines?the?entry?point?for?the?console?application.
//
#include?“stdafx.h“
#define?N?20??//變量數組長度
#define?M?30??//所能存儲的記錄個數
struct?student{???//單個學生的記錄結構
char?sno[N];
????char?sname[N];
????float?MATH;
float?DATASTRUCT;
float?ENGLISH;
float?total;
};
void?form(){??????//輸出表頭
printf(“學號???????????姓名?????????數學?????數據結構?????英語?????總分\n“);
}//form?????????
void?pri(struct?student?stu[]int?i){??????//輸出函數-輸出單個學生記錄
???printf(“%-15s“stu[i].sno);
???printf(“%-10s“stu[i].sname);
???printf(“???%-6.2f“stu[i].MATH);
???printf(“???%-6.2f“stu[i].DATASTRUCT);
???printf(“???????%-6.2f“stu[i].ENGLISH);
???printf(“???%-6.2f\n“stu[i].total);
}//pri
void?Disp(struct?student?stu[]int?n){?????//輸出函數-輸出所存儲的所有記錄
int?i;
????if(n==0){
system(“cls“);
pr
- 上一篇:航空客運訂票系統(C++)
- 下一篇:局部光照算法實現源代碼
評論
共有 條評論