Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2338125
  • 博文数量: 816
  • 博客积分: 10000
  • 博客等级: 上将
  • 技术积分: 5010
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-17 17:57
文章分类

全部博文(816)

文章存档

2011年(1)

2008年(815)

分类:

2008-12-17 18:08:30

 #include"stdio.h"
#include"conio.h"
#include
#include
#include
#include"graphics.h"
#include"dos.h"
#include"stdio.h"
#define PI 3.1415
#define H PI/180.0
#define M 30
#define N 5
#define AL PI/180.0
#define AL1 PI/15.0
struct stu
{int num;
 char name[20],sex[10],class[20],room[20];
 int eng,maths,ccc;
 char tel[20];
 float ave;
 int lv;
}stu[30];
   main()
{ char ch1;
 do{  clrscr();
   printf("\n\n\n\n\n\n\n\n\n");
   printf("    ******************  C 语言课程设计  *******************\n");
   printf("         -------------------------------------------\n");
   printf("                       1 学生成绩管理\n\n");
   printf("                       2 绘图及动画\n\n");
   printf("                       3 做时钟\n\n");
   printf("                       4 退     出\n\n");
   printf("                         输入选择序号\n");
   printf("          --------------------------------------------\n");
   printf("******************************************************\n");
   while((ch1=getchar(),ch1!='1'&&ch1!='2'&&ch1!='3'&&ch1!='4'));
   switch(ch1)
         { case'1': section1(); break;
           case'2': section2(); break;
           case'3': section3(); break;
           case'4': exit(0);}
    }while(1);
}

section1()
{char  ch21;
 do{   clrscr();printf("\n\n\n\n\n\n\n\n\n\n");
   printf("  ******************  学 生 资 讯 管 理 系 统 ******************  \n");
   printf("  *    -----------------------------------------------------  *  \n");
   printf("  *    -     1. 计算平均分及名次      2. 计算分数段人数    - *\n\n");
   printf("  *    -     3. 统计不及格情况        4. 输出优秀学生      -    *\n\n");
   printf("  *    -     5. 作分布图              6. 返回上级菜单      -    *  \n");
   printf("  *    -                    输入选择序号                   -   *  \n");
   printf("  *    -----------------------------------------------------     \n");
   printf("  ***************************************************************  \n");
   
while((ch21=getchar(),ch21!='1'&&ch21!='2'&&ch21!='3'&&ch21!='4'&&ch21!='5'&&ch21!='6'));
      switch(ch21)
         {case'1':function1_1();break;
          case'2':function1_2();break;
          case'3':function1_3();break;
          case'4':function1_4();break;
          case'5':function1_5();break;
          case'6':return(0);}
    }while(1);
  }

section2()
{ char ch22;
  do{  clrscr();printf("\n\n\n\n\n\n\n\n\n\n");
  printf("        ******************绘图及动画*******************\n");
  printf("                  --------------------------         \n");
  printf("                       1. 作曲线图                 \n\n");
  printf("                       2. 作动画                \n\n");
  printf("                       3. 返回上级菜单           \n\n");
  printf("                         输入选择序号                \n");
  printf("                  --------------------------          \n");
  printf("        *********************************************** \n");
  while((ch22=getchar(),ch22!='1'&&ch22!='2'&&ch22!='3'));
  switch(ch22)
         {case'1': function2_1();break;
          case'2': function2_2();break;
          case'3': return(0);break;}
  }while(1);
 }
 section3()
{ char ch33;
  do{  clrscr();printf("\n\n\n\n\n\n\n\n\n\n");
  printf("        ******************  时钟  ******************  \n");
  printf("                 --------------------------         \n");
  printf("                     1.作时钟                 \n\n");
  printf("                      2.返回上级菜单            \n\n");
  printf("                        输入选择序号              \n");
  printf("                 --------------------------         \n");
  printf("        ********************************************  \n");
  while((ch33=getchar(),ch33!='1'&&ch33!='2'));
  switch(ch33)
         {case'1': function3_1();break;
          case'2': return(0);}
  }while(1);
 }
 /*结束*/
/*学生成绩管理*/
function1_1()
{
getchar();
 average();        /*平均分及排名*/
 getchar();getchar();
}

function1_2()      /*各科平均分及分数断统计*/
{


--------------------next---------------------

阅读(1330) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~