⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 学生管理.c

📁 /*** *** *** *****/ /* Turbo C2.0下运行通过 */ /* 一个和学生管理有关的程序
💻 C
📖 第 1 页 / 共 2 页
字号:
/***********************************/
/*	Turbo C2.0下运行通过	   */
/*	一个和学生管理有关的程序   */
/*	http://huaigong.myrice.com */
/***********************************/
#include<graphics.h>
#include<process.h>
#include<stdlib.h>
#include<alloc.h>
#include<ctype.h>
#include<math.h>
#include<stdio.h>
#include<dos.h>
#include<stdlib.h>
#define TRUE 1
#define FALSE 0
#define KB_LEFT  75
#define KB_RIGHT 77
#define KB_ENTER 28
#define KB_Q     16
#define pi 3.1415926
#define COLOR1 WHITE
#define COLOR2 YELLOW
int MaxColor;
int n=0;
int get_key();
int choice(int x,int y);
int get_item(int,int);
int adin(int ch,int n);
void *gb;
void kitty()
{ int gdriver=VGA,gmode=VGAHI;
  int i,j,x[40],y[40];
  initgraph(&gdriver,&gmode,"e:\\tc");
  cleardevice();
  setcolor(3);
  setfillstyle(LTBKSLASH_FILL,3);
 ellipse(350,270,0,360,240,160);
  floodfill(350,270,3);
  setcolor(14);
  moveto(420,310);
  lineto(300,450);
  lineto(540,450);
  lineto(420,310);
  setfillstyle(SOLID_FILL,14);
  floodfill(420,380,14);
  setcolor(RED);
  circle(420,250,120);
   setfillstyle(SOLID_FILL,WHITE);
   floodfill(420,250,RED);
   setcolor(BLACK);
   circle(350,240,10);
  circle(490,240,10);
  setfillstyle(SOLID_FILL,BLACK);
  floodfill(350,240,BLACK);
  floodfill(490,240,BLACK);
   setcolor(12);
   circle(340,270,14);
  circle(500,270,14);
 setfillstyle(BKSLASH_FILL,4);
 floodfill(340,260,12);
 floodfill(500,260,12);
 setcolor(BLACK);
 setfillstyle(SOLID_FILL,RED);
     fillellipse(410,130,50,80);
 fillellipse(510,150,50,80);
  setcolor(0);
   circle(505,150,35);
   circle(415,130,35);
   setfillstyle(SOLID_FILL,BLACK);
    floodfill(505,150,0);
    floodfill(415,130,0);
   setcolor(6);
  circle(460,140,30);
  setfillstyle(SOLID_FILL,0);
   floodfill(460,140,6);
   setcolor(4);
  arc(420,300,225,315,20);
  ellipse(420,321,170,365,6,10);
 setfillstyle(SOLID_FILL,4);
floodfill(420,330,4);
 circle(200,60,40);
  circle(162,88,40);
   circle(238,88,40);
   circle(176,132,40);
   circle(224,132,40);
   circle(100,170,30);
   circle(129,191,30);
circle(71,191,30);
 circle(82,224,30);
   circle(118,224,30);
   circle(100,200,6);
    setfillstyle(SOLID_FILL,14);
    floodfill(200,60,4);
   floodfill(162,88,4);
  floodfill(238,88,4);
floodfill(176,132,4);
 floodfill(224,132,4);
 setfillstyle(SOLID_FILL,5);
 floodfill(100,170,4);
  floodfill(129,191,4);
   floodfill(71,191,4);
    floodfill(82,224,4);
     floodfill(118,224,4);
      setcolor(0);
	circle(200,100,10);
	 setfillstyle(SOLID_FILL,15);
	 floodfill(200,100,0);
	 setcolor(7);
	 ellipse(330,380,0,360,50,15);
	 ellipse(510,380,0,360,50,15);
	 setfillstyle(SOLID_FILL,12);
	 floodfill(330,380,7);
	 floodfill(510,380,7);
	 setcolor(8);
	 circle(270,380,20);
 circle(570,380,20);
 setfillstyle(SOLID_FILL,15);
 floodfill(270,380,8);
 floodfill(570,380,8);
 setcolor(3);
 circle(360,459,20);
 circle(480,459,20);
 setfillstyle(SOLID_FILL,15);
 floodfill(360,451,3);
 floodfill(480,451,3);
 settextjustify(0,2);
 settextstyle(4,0,3);
 setcolor(14);
 for(i=0;i<30;i++)
 y[i]=15*i+10;
 for(j=0;j<30;j++)
 {arc(10,y[j],0,180,5);
  arc(20,y[j],0,180,5);
   ellipse(15,y[j],180,360,10,15);
    arc(620,y[j],0,180,5);
     arc(610,y[j],0,180,5);
      ellipse(615,y[j],180,360,10,15);delay(2000);
	}
	for(i=0;i<=30;i++)
	x[i]=20*i+15;
	for(j=0;j<=30;j++)
	{arc(x[j]-5,10,0,180,5);
	arc(x[j]+5,10,0,180,5);
	ellipse(x[j],10,180,360,10,15);
	arc(x[j]-5,445,0,180,5);
	 arc(x[j]+5,445,0,180,5);
	  ellipse(x[j],445,180,360,10,15);delay(2000);
	   }
	    setcolor(12); settextstyle(0,0,3);
  outtextxy(200,20,"Hi,this a wondful place!");
   delay(15000);
    setcolor(13);
     outtextxy(60,380,"You are welcome");
      getch();
       closegraph() ;
	     }

	       void goodbyer(void)
	       { int gdriver=VGA,gmode=VGAHI;
		long t;
		 struct palettetype pt;
		  int x,c=COLOR1;int k;int i,j;
		   unsigned size;void *buf,*bike;
			initgraph(&gdriver,&gmode,"e:\\tc");
		     cleardevice();        setbkcolor(9);
		      setcolor(14);
      setfillstyle(SOLID_FILL,14);
      moveto(160,40);     lineto(163,47);
	lineto(170,47); lineto(164,51);
     lineto(166,58);lineto(160,54);   lineto(154,58);
     lineto(155,51);  lineto(150,47);   lineto(157,47);
     lineto(160,40);
      floodfill(160,43,14);
     size=imagesize(160,40,166,60);buf=malloc(size);
  if(buf) getimage(160,40,166,60,buf);
   cleardevice();
     setcolor(12);
     setlinestyle(0,0,3);
    circle(530,390,60);
    moveto(530,330);
    lineto(540,315);
   ellipse(542,305,0,360,20,6);
    circle(327,350,100);
    moveto(327,350);lineto(530,390);
     arc(327,350,45,115,105);
      moveto(335,246);lineto(342,216);
      moveto(314,209);
     lineto(370,215);
     moveto(449,375);
    lineto(440,402);
    ellipse(440,409,0,360,15,5);
      for(i=0;i<=12;i++)
       {
   moveto(327,350);
    lineto(cos(i*pi/6)*100+327,350-sin(i*pi/6)*100);
     }
      for(i=0;i<=12;i++)
       {moveto(530,390);
      lineto(cos(i*pi/6)*60+530,390-sin(i*pi/6)*60);
    }
    bike=malloc(imagesize(200,180,630,460));
     if(bike) getimage(200,180,630,460,bike);
      /*  for(;!kbhit();)
    for(x=200;x>=20;x-=50)
   {
   putimage(x,180,bike,XOR_PUT);
   delay(500);
   putimage(x-50,180,bike,COPY_PUT);
	  }*/
    setcolor(7);
    setfillstyle(SOLID_FILL,7);
    arc(100,100,173,277,50);
    arc(80,120,140,310,40);
    floodfill(46,140,7);
    for(;!kbhit();)
    for(x=50;x<=600;x+=30)
  {
    putimage(x+9,40,buf,COPY_PUT);
    delay(1500);
   putimage(x+9,40,buf,XOR_PUT);  }

     for(x=200;x>=20;x-=50)
     {
     putimage(x,180,bike,XOR_PUT);
     delay(1000);
    putimage(x-50,180,bike,COPY_PUT);
     }
     delay(10000);
   gettime(&t);
   srand(t);
   MaxColor=getmaxcolor();
   getpalette(&pt);
   settextjustify(CENTER_TEXT,CENTER_TEXT);
   show_char();
   for(i=0;i<640;i+=10)
   { setfillstyle(1,c=c==COLOR2?COLOR1:COLOR2);
    bar(i,100,i+10,110);
     }
     for(i=110;i<300;i+=10)
    {setfillstyle(1,c=c==COLOR2?COLOR1:COLOR2);
     bar(i,100,i+10,110);
     }
     for(i=630;i>=0;i-=10)
     {setfillstyle(1,COLOR2?COLOR1:COLOR2);
   bar(i,300,i+10,310 ) ;
  }
    for(i=290;i>100;i-=10)
  {setfillstyle(1,c=c==COLOR2?COLOR1:COLOR2);
     bar(0,i,10,i+10);
   }
      setfillstyle(SOLID_FILL,0);
     for(;!kbhit();)
  {show_char() ;
      for(k=0;k<8;k++)
      {setpalette(COLOR1,k&1?pt.colors[COLOR1]:pt.colors[COLOR2]);
    setpalette(COLOR2,k&1?pt.colors[COLOR2]:pt.colors[COLOR1]);
    if(k<8) for(i=1;i++<30000;) for(j=1;j++<2;) ;
	   }
	 }
	   getch();
	   getch();
	 closegraph();
	  }
     show_char()
   {static int font=0;
    int c=random(MaxColor+1);
    static font_size[]={7,10,20,10,10,10};
  if(c!=BLACK) setcolor(c);
   else setcolor(random(MaxColor+1));
  bar(10,110,630,300);
  settextstyle(font,HORIZ_DIR,font_size[font]);
  setfillstyle(1,11);
  fillellipse(315,185,175,55);
  outtextxy(310,200,"Good");delay(10000);
  setfillstyle(1,14);
  fillellipse(315,185,175,55);
   setcolor(5);   outtextxy(310,200,"Bye"); delay(10000);
  setfillstyle(1,10);fillellipse(315,185,175,55);
  setcolor(13);outtextxy(310,200,"See"); delay(10000);
  setfillstyle(1,12); fillellipse(315,185,175,55); setcolor(14);
  outtextxy(310,200,"You");
 settextstyle(1,0,5);
   setcolor(5);
  outtextxy(100,260,"T");delay(1500);
  outtextxy(130,260,"h");delay(1500);
  outtextxy(160,260,"a");delay(1500);
  outtextxy(190,260,"n"); delay(1500);
  outtextxy(220,260,"k");delay(1500);
  outtextxy(250,260,"s");delay(1500);
  outtextxy(290,260,"V");delay(1500);
  outtextxy(320,260,"e");delay(1500);
  outtextxy(350,260,"r");delay(1500);
  outtextxy(380,260,"y");delay(1500);
  outtextxy(420,260,"M");delay(1500);
  outtextxy(450,260,"u");delay(1500);
  outtextxy(480,260,"c");delay(1500);
  outtextxy(510,260,"h");delay(1500);
  setcolor(14);
  arc(60,270,60,120,10);arc(530,270,60,120,10); delay(10000);
  arc(80,270,60,120,10);arc(550,270,60,120,10); delay(10000);
  arc(70,272,240,300,10); arc(540,272,240,300,10);
  font=(font+1)%5;
 }
main()
{
  int driver=VGA,mode=VGAHI,flag=0;
  int ad[640];
  int row,item_num,i,ch,y,n,data,done,k;
  float da;
  unsigned size;
      kitty();
  for(i=0;i<640;i++)
    ad[i]=580/2;

  while(!flag)
  {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -