1、/*四、程序流程图:#include string.hstdio.h#include dos.hconio.h#define MOVEIN 1#define GUIYUE 2#define ACC 3#define OK 1#define ERROR 0#define MAXSH 7#define MAXSHL 10#define MAXINPUT 50#define maxsize 100int act;int ip=0;int line=0; /*line为要写的行号,全局变量*/int writeok;int right;char wel30 = Welcome To Use An_Li
2、 System;char ente76= 警告:未经作者同意不得随意复制更改!char rights40=Copyright (c) 2002struct date today;struct time now;typedef structint datamaxsize;int top;stack;int emptystack(stack *S)if(S-top=48&S-dataS-top=35)return(1);/*35 is #*/else return(0);int push(stack *S,int x)top=maxsize-1)return(-1);elseS-top+;top=
3、x;return(0); int gettop(stack *S)return S-top;int pop(stack *S)if(emptystack(S)printf(the stack is emptyn);exit(1);else S-top-;return S-top+1;void initstack(stack *S)int i;top=0;top=35;/*模拟打字机的效果*/delay_fun()int i;void music();for(i=0;i+) if(wel!=0) delay(1000); textcolor(YELLOW); gotoxy(26+i,8); cp
4、rintf(%c,wel);谢谢网络 music(1,60); else break;delay(500000); ; i+) if(ente! textcolor(RED);/*显示警告及版权*/ gotoxy(2+i,11);,ente);delay(40000); if(rights != gotoxy(30+i,14);,rights);music(1,60); else break;getch();/*登陆后的效果*/logined() clrscr();gotoxy(28,10);textcolor(YELLOW);cprintf(程序正在载入 请稍候.gotoxy(35,12);
5、i=50; gotoxy(40,12); delay(8000);%02d%已完成,i*2); gotoxy(i+15,13);n|main0();/*对PC扬声器操作的函数*/void music(int loop,int f) /* f为频率*/30*loop;sound(f*20);delay(200);nosound();int analys(int s,int a)int hh,pos;switch(a)case (int)ihh=0;break;case (int)+hh=1;*hh=2;(hh=3;)hh=4;hh=5;Ehh=6;Thh=7;Fhh=8;default:prin
6、tf( n analys()分析发现不该有的字符 %c !(位置:%d),a,ip+1);writeerror(0,n.分析出现错误!writeerror(a,n 错误类型: 不该有字符 网 return ERROR;pos=(s-48)*10+hh;switch(pos)case 3: case 43: case 63: case 73:act=4;return MOVEIN; case 0: case 40: case 60: case 70:act=5; case 11: case 81: act=6;case 92:case 22:act=7;case 84:act=11;/*-*/c
7、ase 91:case 94:case 95:act=1;return GUIYUE;case 21:case 24:case 25:act=2;case 101:case 102:case 104:case 105:act=3;case 31:case 32:case 34:case 35:case 111:case 112:case 114:case 115:case 51:case 52:case 54:case 55:act=6;/*+*/case 15:return ACC;/*/case 6:return 1;case 7:case 47:return 2;case 8:case 48:case 68:return 3;case 46:return 8;case 67:return 9;case 78:return 10;if(a=)printf( else printf( n analys() 分析发现字符 %c 不是所期望的! writeerror(n .分析出现错误! writeerror(a, 字符 不是所期望的! int writefile(int a,char *st)FILE *fp;fp=fopen(an_slr.txtaif(fp=0)printf(nwrite error!writeok=0;elseif
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1