签到

06月21日
尚未签到

共有回帖数 0

    懂得生活的人

    等级:
    #includestring.h
    #includebios.h
    #includestdlib.h
    #includeconio.h
    #define LEFT 0x4b00
    #define RIGHT 0x4d00
    #define ESC 0x011b
    #define ENTER 0x1c0d
    char *a[4]={"left","right","up","down"};
    int num=3000,key,year=2006;
    int i,j,first=3,w=30;
    char *month[12]={"Junuary","February","March","April","May","June","July","August","September","October","November","December"};
    int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    int fd[12]={0};

    int getkey()
    {char lowbyte;
    int press;
    while(bioskey(1)==0)
       press=bioskey(0);
    lowbyte=press&0xff;
    press=press&0xff00+toupper(lowbyte);
    return(press);
    }

    void sch()
    {window(22,24,30,24);
    textbackground(GREEN);
    clrscr();
    textcolor(15);
    cprintf("n Search");}


    void sch_0()
    {window(22,24,30,24);
    textbackground(GREEN);
    clrscr();
    textcolor(128);
    cprintf("n Search ");}


    void backk()

    {window(33,24,42,24);
    textbackground(GREEN);
    clrscr();
    textcolor(15);
    cprintf("n Month1-4");}


    void backk_0()
    {window(33,24,42,24);
    textbackground(GREEN);
    clrscr();
    textcolor(128);
    cprintf("n Month1-4");}


    void left()
    {
    window(45,24,54,24);
    textbackground(GREEN);
    clrscr();
    textcolor(15);
    cprintf("n Month5-8");}


    void left_0()
    {
    window(45,24,54,24);
    textbackground(GREEN);
    clrscr();
    textcolor(128);
    cprintf("n Month5-8");}


    void right()
    {window(57,24,67,24);
    textbackground(GREEN);
    clrscr();
    textcolor(15);
    cprintf("n Month9-12");}


    void right_0()
    {window(57,24,67,24);
    textbackground(GREEN);
    clrscr();
    textcolor(128);
    cprintf("n Month9-12");}







    void iexit()
    {window(70,24,77,24);
    textbackground(GREEN);
    clrscr();
    textcolor(15);
    cprintf("n  Exit");}


    void iexit_0()
    {window(70,24,77,24);
    textbackground(GREEN);
    clrscr();
    textcolor(128);
    cprintf("n  Exit");}






    void jiance(int n)
    {switch(n)
      {case 0:sch_0();left();right();iexit();backk();break;
       case 1:backk_0();left();right();iexit();sch();break;
       case 2:left_0();right();iexit();sch();backk();break;
       case 3:right_0();left();iexit();sch();backk();break;
       case 4:iexit_0();left();right();sch();backk();break;
       default:exit(0);
       }

    }


    void quzhi()
    {window(8,24,20,24);
    textbackground(15);
    clrscr();
    textcolor(RED);
    cscanf("%d",&year);
    }





    void month1_4()
    {
    for(i=0;i2;i++)
       {window(2+i*w,3,29+w*i,11);
        textbackground(5);
        clrscr();
        textcolor(GREEN);
        cprintf("            %sn",month);
        gotoxy(1,2);cprintf(" Mon Tue Wed Thu Fri Sat Sun");
        gotoxy(4*(fd-1)+1,3);
        for(j=1;j=mon;j++)
       {cprintf("%3d ",j);
        /*if((first+j-1)%7==0)putchar('n');*/
        }
        /*first=(first+mon)%7;
        if(first==0)first=7;*/
        }
    for(i=2;i4;i++)
       {window(2+(i-2)*w,13,29+w*(i-2),21);
        textbackground(5);
        clrscr();
        textcolor(GREEN);
        cprintf("            %sn",month);
        gotoxy(1,2);cprintf(" Mon Tue Wed Thu Fri Sat Sun");
        gotoxy(4*(fd-1)+1,3);


       for(j=1;j=mon;j++)
       {cprintf("%3d ",j);
        /*if((first+j-1)%7==0)putchar('n');*/
        }
        /*first=(first+mon)%7;
        if(first==0)first=7;*/
    }
    }




      void month5_8()
    {for(i=0;i2;i++)
       {window(2+i*w,3,29+w*i,11);
        textbackground(5);
        clrscr();
        textcolor(GREEN);
        cprintf("            %sn",month[i+4]);
        gotoxy(1,2);cprintf(" Mon Tue Wed Thu Fri Sat Sun");
        gotoxy(4*(fd[i+4]-1)+1,3);
        for(j=1;j=mon[i+4];j++)
       {cprintf("%3d ",j);
        /*if((first+j-1)%7==0)putchar('n');*/
        }
        /*first=(first+mon[i+4])%7;
        if(first==0)first=7;*/
    }
    for(i=2;i4;i++)
       {window(2+(i-2)*w,13,29+w*(i-2),21);
        textbackground(5);
        clrscr();
        textcolor(GREEN);
        cprintf("           %s",month[i+4]);
        gotoxy(1,2);cprintf(" Mon Tue Wed Thu Fri Sat Sun");
        gotoxy(4*(fd[i+4]-1)+1,3);
        for(j=1;j=mon[i+4];j++)
       {cprintf("%3d ",j);
        /*if((first+j-1)%7==0)putchar('n');*/
        }
        /*first=(first+mon[i+4])%7;
        if(first==0)first=7;*/
    }
    }


    void month9_12()
    {for(i=0;i2;i++)
       {window(2+i*w,3,29+w*i,11);
        textbackground(5);
        clrscr();
        textcolor(GREEN);
        cprintf("            %sn",month[i+8]);
        gotoxy(1,2);cprintf(" Mon Tue Wed Thu Fri Sat Sun");
        gotoxy(4*(fd[i+8]-1)+1,3);
        for(j=1;j=mon[i+8];j++)
       {cprintf("%3d ",j);
        /*if((first+j-1)%7==0)putchar('n');*/
        }
        /*first=(first+mon[i+8])%7;
        if(first==0)first=7;*/
    }
    for(i=2;i4;i++)
       {window(2+(i-2)*w,13,29+w*(i-2),21);
        textbackground(5);
        clrscr();
        textcolor(GREEN);
        cprintf("            %s",month[i+8]);
        gotoxy(1,2);cprintf(" Mon Tue Wed Thu Fri Sat Sun");
        gotoxy(4*(fd[i+8]-1)+1,3);
        for(j=1;j=mon[i+8];j++)
       {cprintf("%3d ",j);
        /*if((first+j-1)%7==0)putchar('n');*/
        }
        /*first=(first+mon[i+8])%7;
        if(first==0)first=7;*/
    }
    }




    void calendar(int year)
    {int x,cha;
    long day=0;
    window(1,2,80,22);
    textbackground(YELLOW);
    clrscr();
    if(year2007)
        {for(x=year;x2007;x++)
      {if((x%4==0&&x%100!=0)||x%400==0)
       day+=366;
       else day+=365;}
          cha=day%7;
          first=(7+1-cha)%7;
          if(first==0)first=7;
          }
    if(year==2007)first=1;
    if(year2007)
        {for(x=2007;xyear;x++)
     {if((x%4==0&&x%100!=0)||x%400==0)
       day+=366;
       else day+=365;}
          cha=day%7;
          first=(1+cha)%7;
          if(first==0)first=7;
        }
    if((year%4==0&&year%100!=0)||year%400==0)
      mon[1]=29;
    else mon[1]=28;
    fd[0]=first;
    for(j=1;j12;j++)
       {fd[j]=(fd[j-1]+mon[j-1])%7;
        if(fd[j]==0)fd[j]=7;}
    month1_4();}




    void jiance2(int n)
    {void nian(int year);
    switch(n)
       {case 0:getch( );quzhi();calendar(year);nian(year);break;
        case 1:month1_4();break;
        case 2:month5_8();break;
        case 3:month9_12();break;
        case 4:exit(0);break;
        default:exit(0);}
    }



    void ping()
    {clrscr();
    window(1,1,80,1);
    textbackground(RED);

    zm 怎么不做一个界面出来呢?

    楼主 2016-03-03 17:25 回复

共有回帖数 0
  • 回 帖
  • 表情 图片 视频
  • 发表

登录直线网账号

Copyright © 2010~2015 直线网 版权所有,All Rights Reserved.沪ICP备10039589号 意见反馈 | 关于直线 | 版权声明 | 会员须知