array(2) { ["docs"]=> array(10) { [0]=> array(10) { ["id"]=> string(3) "428" ["text"]=> string(77) "Visual Studio 2017 单独启动MSDN帮助(Microsoft Help Viewer)的方法" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(8) "DonetRen" ["tagsname"]=> string(55) "Visual Studio 2017|MSDN帮助|C#程序|.NET|Help Viewer" ["tagsid"]=> string(23) "[401,402,403,"300",404]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400964" ["_id"]=> string(3) "428" } [1]=> array(10) { ["id"]=> string(3) "427" ["text"]=> string(42) "npm -v;报错 cannot find module "wrapp"" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(4) "zzty" ["tagsname"]=> string(50) "node.js|npm|cannot find module "wrapp“|node" ["tagsid"]=> string(19) "[398,"239",399,400]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400760" ["_id"]=> string(3) "427" } [2]=> array(10) { ["id"]=> string(3) "426" ["text"]=> string(54) "说说css中pt、px、em、rem都扮演了什么角色" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(12) "zhengqiaoyin" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400640" ["_id"]=> string(3) "426" } [3]=> array(10) { ["id"]=> string(3) "425" ["text"]=> string(83) "深入学习JS执行--创建执行上下文(变量对象,作用域链,this)" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "Ry-yuan" ["tagsname"]=> string(33) "Javascript|Javascript执行过程" ["tagsid"]=> string(13) "["169","191"]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511399901" ["_id"]=> string(3) "425" } [4]=> array(10) { ["id"]=> string(3) "424" ["text"]=> string(30) "C# 排序技术研究与对比" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(9) "vveiliang" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(8) ".Net Dev" ["catesid"]=> string(5) "[199]" ["createtime"]=> string(10) "1511399150" ["_id"]=> string(3) "424" } [5]=> array(10) { ["id"]=> string(3) "423" ["text"]=> string(72) "【算法】小白的算法笔记:快速排序算法的编码和优化" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(9) "penghuwan" ["tagsname"]=> string(6) "算法" ["tagsid"]=> string(7) "["344"]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511398109" ["_id"]=> string(3) "423" } [6]=> array(10) { ["id"]=> string(3) "422" ["text"]=> string(64) "JavaScript数据可视化编程学习(二)Flotr2,雷达图" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "chengxs" ["tagsname"]=> string(28) "数据可视化|前端学习" ["tagsid"]=> string(9) "[396,397]" ["catesname"]=> string(18) "前端基本知识" ["catesid"]=> string(5) "[198]" ["createtime"]=> string(10) "1511397800" ["_id"]=> string(3) "422" } [7]=> array(10) { ["id"]=> string(3) "421" ["text"]=> string(36) "C#表达式目录树(Expression)" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(4) "wwym" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(4) ".NET" ["catesid"]=> string(7) "["119"]" ["createtime"]=> string(10) "1511397474" ["_id"]=> string(3) "421" } [8]=> array(10) { ["id"]=> string(3) "420" ["text"]=> string(47) "数据结构 队列_队列实例:事件处理" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "idreamo" ["tagsname"]=> string(40) "C语言|数据结构|队列|事件处理" ["tagsid"]=> string(23) "["246","247","248",395]" ["catesname"]=> string(12) "数据结构" ["catesid"]=> string(7) "["133"]" ["createtime"]=> string(10) "1511397279" ["_id"]=> string(3) "420" } [9]=> array(10) { ["id"]=> string(3) "419" ["text"]=> string(47) "久等了,博客园官方Android客户端发布" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(3) "cmt" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511396549" ["_id"]=> string(3) "419" } } ["count"]=> int(200) } 222 C语言学生信息管理系统 - 爱码网
soTired

//原创,,,!! 账号:admin ; 密码:123456;

//输入信息时按照 fengshun 1403 m 311409010315 99 98 97格式输入, 输出会比较整齐 ;

  1 #include <stdio.h>
  2 #include <stdlib.h>
  3 #include <string.h>
  4 #include <algorithm>
  5 using namespace std;
  6 int n;
  7 
  8 struct student
  9 {
 10     char name[20] ;          //姓名 ; 
 11     char classnumber[10] ;   //班级 ;(1403) 
 12     char gender[2] ;         //性别 ; 
 13     char xuehao[20] ;        //学号 ; 
 14     int math ;               //数学成绩 ; 
 15     int chinese ;            //语文成绩 ; 
 16     int computer ;           //计算机成绩 ; 
 17 } ;
 18 student num[10] ;
 19 
 20 bool cmp(student xuehao,student classnumber)
 21 {
 22     return strcmp(xuehao.name, classnumber.name) < 0 ;
 23 }
 24 
 25 void SCANF(int n)            //学生信息输入 ;  
 26 {
 27     int i ;
 28     for(i=1; i<=n; i++)
 29     {
 30         printf("请输入第%d个学生信息:\n",i) ;
 31         scanf("%s %s %s %s %d %d %d",num[i].name, num[i].classnumber, num[i].gender, num[i].xuehao, &num[i].math, &num[i].chinese, &num[i].computer) ;
 32     }
 33 }
 34 
 35 void PRINTF(int n)          //输出全部学生信息 ; 
 36 {
 37     int  i;
 38     printf("name     classnumber gender xuehao       math chinese computer\n") ;
 39     for(i=1; i<=n; i++)
 40     printf("%s %s        %s      %s %d   %d      %d\n",num[i].name, num[i].classnumber, num[i].gender, num[i].xuehao, num[i].math, num[i].chinese, num[i].computer) ;
 41     printf("\n") ;
 42 }
 43 
 44 void PAIXU(int n)            //对学生信息按照名字首字母进行排序 ; 
 45 {
 46     sort (num+1, num+n+1, cmp) ;
 47 }
 48 
 49 void SINGLEPRINTF(int temp)  //查询某个学生信息 ; 
 50 {
 51     printf("%s %s %s %s %d %d %d\n",num[temp].name, num[temp].classnumber, num[temp].gender, num[temp].xuehao, num[temp].math, num[temp].chinese, num[temp].computer ) ;
 52 }
 53 
 54 
 55 void ALTER(int n)           //修改学生信息 ; 
 56 {
 57     scanf("%s %s %s %s %d %d %d",num[n].name, num[n].classnumber, num[n].gender, num[n].xuehao, &num[n].math, &num[n].chinese, &num[n].computer) ;
 58 } 
 59 
 60 void HEAD ()                // 登录界面 ; 
 61 {
 62     printf("\n\n");  
 63         printf("  \t┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n");  
 64         printf("  \t┃ ******************************************************** ┃\n");  
 65         printf("  \t┃***┏━━━━━━━━━━━━━━━━━━━━━━━━┓***┃\n");  
 66         printf("  \t┃***┃************************************************┃***┃\n");  
 67         printf("  \t┃***┃***                                         ****┃***┃\n");  
 68         printf("  \t┃***┃***         欢迎使用学生信息管理系统        ****┃***┃\n");  
 69         printf("  \t┃***┃***                                         ****┃***┃\n");  
 70         printf("  \t┃***┃***                                         ****┃***┃\n");  
 71         printf("  \t┃***┃***                  封顺                   ****┃***┃\n");  
 72         printf("  \t┃***┃***                                         ****┃***┃\n");  
 73         printf("  \t┃***┃***                2015.07.05               ****┃***┃\n");  
 74         printf("  \t┃***┃***                                         ****┃***┃\n");  
 75         printf("  \t┃***┃************************************************┃***┃\n");  
 76         printf("  \t┃***┗━━━━━━━━━━━━━━━━━━━━━━━━┛***┃\n");  
 77         printf("  \t┃ ******************************************************** ┃\n");  
 78         printf("  \t┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n");    
 79 } 
 80 
 81 void GONGNENG()   // 功能菜单 ; 
 82 {
 83       printf("\n\n\n");  
 84         printf("  \t┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n");  
 85         printf("  \t┃ ******************************************************** ┃\n");  
 86         printf("  \t┃***┏━━━━━━━━━━━━━━━━━━━━━━━━┓***┃\n");  
 87         printf("  \t┃***┃************************************************┃***┃\n");  
 88         printf("  \t┃***┃***  1、学生信息输入      2、学生信息查询   ****┃***┃\n");  
 89         printf("  \t┃***┃***                                         ****┃***┃\n");  
 90         printf("  \t┃***┃***                                         ****┃***┃\n");  
 91         printf("  \t┃***┃***  3、输出全部学生信息  4、学生信息排序   ****┃***┃\n");  
 92         printf("  \t┃***┃***                                           ****┃***┃\n");  
 93         printf("  \t┃***┃***                                         ****┃***┃\n");  
 94         printf("  \t┃***┃***  5、学生信息修改      6、退出系统       ****┃***┃\n");  
 95         printf("  \t┃***┃***                                         ****┃***┃\n");  
 96         printf("  \t┃***┃************************************************┃***┃\n");  
 97         printf("  \t┃***┗━━━━━━━━━━━━━━━━━━━━━━━━┛***┃\n");  
 98         printf("  \t┃ ******************************************************** ┃\n");  
 99         printf("  \t┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n");
100 }
101 
102 main()  
103 {
104     int times=3 ;
105     do
106     {
107         int i ; char str[10], ch[10] ;  
108         HEAD () ; 
109         printf("                       请输入您的账号:") ;
110         scanf("%s",str) ;    
111         printf("                       请输入您的密码:") ;
112         scanf("%s",ch) ; 
113         printf("\n") ;
114         if(strcmp(str, "admin") == 0 && strcmp(ch, "123456") == 0)
115         {
116             system("cls") ;   //清屏函数 ; 
117             printf("登陆成功,请选择操作:") ; 
118             GONGNENG () ; 
119             printf("\n") ;
120             int a, temp=0 ;   //temp=0 ; 
121              do 
122             {
123                 printf("\n\n") ;
124                 printf("********************请输入学生管理系统功能所对应编号(1~6)*********************") ;
125                 printf("请输入编号:") ; 
126                 scanf("%d", &a) ;
127                 printf("\n") ;
128                 switch(a)
129                 {
130                     
131                     int key;  key=0 ;      //设置一个开关key ; 在没有执行系统功能1时提醒先进行学生信息输入 ; 
132                     case 1:
133                     {
134                         system("cls") ;
135                         key = 1 ;
136                         printf("统计信息包括:姓名 班级 性别 学号 数学成绩 语文成绩 计算机成绩\n\n") ; 
137                         printf("请输入要统计学生信息的总人数:");
138                         scanf("%d",&n) ; 
139                         SCANF(n) ;        //调用函数 ; 
140                         printf("\n") ;
141                         system("cls") ;
142                         printf("********************      输入完毕,请选择下一功能       ********************");
143                         GONGNENG () ;    //调用函数 ; 
144                         break;  
145                     }
146                     case 2: 
147                     {
148                         system("cls") ;
149                         if(key == 1)
150                         {
151                             printf("请输入需要查询学生号码 :") ;
152                             int temp ;
153                             scanf("%d",&temp) ;
154                             SINGLEPRINTF(temp) ;  //调用函数 ; 
155                             system("pause") ;
156                             printf("查询完毕,请选择下一功能") ;
157                             GONGNENG () ;         //调用函数 ; 
158                         }
159                         else
160                         {
161                             printf("请先执行信息输入操作") ; 
162                             GONGNENG () ;         //调用函数; 
163                         }
164                         break ; 
165                     }
166                     case 3:
167                     {
168                         system("cls") ;
169                         if(key == 1)
170                         {
171                             printf("将输出所有学生成绩\n");
172                             PRINTF(n) ;           //调用函数 ; 
173                             system ("pause") ;
174                             printf("查询完毕,请选择下一功能") ;
175                             GONGNENG () ;         //调用函数 ; 
176                         }
177                         else
178                         {
179                             printf("请先执行信息输入操作") ;
180                             GONGNENG () ;         //调用函数 ; 
181                         }
182                         break ;
183                     } 
184                     case 4: 
185                     {
186                         system ("cls") ;
187                         if(key==1)
188                         {
189                             PAIXU(n) ;           //调用函数 ; 
190                             system("cls") ;
191                             printf("排序完成,请选择下一功能") ;
192                             GONGNENG () ;        //调用函数 ; 
193                         }
194                         else
195                         {
196                             printf("请先执行信息输入操作") ;
197                             GONGNENG () ;        //调用函数 ; 
198                         }
199                         break ;
200                     }
201                     case 5:
202                     {
203                         system("cls") ;
204                         if(key == 1)
205                         {
206                             int n;  
207                             printf("请输入要修改第几个学生信息(1~n):") ;  
208                             scanf("%d",&n) ;
209                             printf("\n") ;
210                             printf("开始修改:\n") ;
211                             ALTER(n) ;        //调用函数 ; 
212                             system("cls") ;                
213                             printf("修改完毕,请选择下一功能") ;
214                             GONGNENG () ;    //调用函数 ; 
215                         }
216                         else
217                         {
218                             printf("请先执行信息输入操作") ;
219                             GONGNENG () ;    //调用函数 ; 
220                         }
221                         break ;
222                     }
223                     case 6:
224                     {
225                         system ("cls") ;
226                         printf("很高兴为您服务,您将退出本次登陆\n\n\n") ;
227                         temp=1 ;
228                     }
229                 }
230             }
231             while(!temp) ;
232         }
233         else
234         {
235             times-- ;
236             system ("cls") ;
237             printf("ERROR !! 账号和密码输入错误 !!剩余输入机会:%d",times) ;
238         }
239     }
240     while(times>0) ;
241 }

 

分类:

技术点:

相关文章: