李露酿先O
PascalMaster
关注数: 0
粉丝数: 2
发帖数: 7
关注贴吧数: 2
发个小程序玩玩 大概两百行吧!拥有注册,登录……因技术问题,有些还没开发,会一直更新! uses crt; var a,b:array[1..1000] of string; x,y,us,l,k,cha,s:string; i,aq,j,t,ss:longint; yy,kk,ll:array[0..10000] of char; procedure Build_the_website; begin clrscr; writeln('Sorry,build the website page not found!'); writeln('Please Enter to exit!'); readln; exit; end; procedure Game; begin clrscr; writeln('Eat water game!Input Q-R-Q-R-Q......!(A line of a!)'); aq:=50; i:=1; t:=55; while aq>0 do begin while not eof do begin t:=t-1; if t=0 then begin clrscr; writeln('Game over!'); exit; end; i:=i+1; readln(cha[i]); upcase(cha[i]); if (cha[i]='Q') and (cha[i-1]='R') or (cha[i]='R') and (cha[i-1]='Q') then aq:=aq-1; end; end; writeln('Win'); exit; end; procedure Artificial_intelligence_ai; begin clrscr; writeln('Because we are in the experiment, so can only answer the question'); writeln('Input the question namber,if you input 110 then go to the home p'); writeln('age,if you input 120 then exit'); writeln('Not have question!'); readln(aq); case aq of 110:exit; 120:halt else writeln('Error!'); end; exit; end; procedure match; begin clrscr; writeln('You want to choose which project?(Input the number)'); writeln('1,Shopping/error'); writeln('2,Build the website/error'); writeln('3,Game'); writeln('4,Artificial intelligence ai'); writeln('5,Exit'); readln(aq); case aq of 3:begin Game; exit; end; 4:begin Artificial_intelligence_ai; exit; end; 5:exit; else begin writeln('Error!Please input the 120 then halt else exit'); readln(y); if y='120' then halt; exit; end; end; end; procedure login; begin i:=1; while x<>a[i] do begin if i=1 then clrscr; gotoxy(1,2); writeln('Login'); writeln('If you not have WEQ user.Please input register!'); gotoxy(1,4); write('User: '); readln(x); if x='' then login; if x='register' then exit; for i:=1 to 1000 do if x=a[i] then break; if (i=1000) and (x<>a[1000]) then begin clrscr; writeln('Not have the User!'); end; end; j:=0; while y<>b[i] do begin write('Password(A line of a):'); readln(y); if y='' then login; if y<>b[i] then begin clrscr; writeln('Password error!'); clrscr; writeln('Is the jump to the homepage!......'); exit; end; end; writeln('Login win!'); clrscr; gotoxy(1,1); writeln('Enter to game!'); match; end; procedure register; begin clrscr; us:=''; a[i]:=''; while us=a[i] do begin ss:=ss+1; clrscr; if ss=1 then writeln else writeln('User alrerdy exists!'); writeln('register'); write('User: '); readln(us); if us='' then register; for i:=1 to 1000 do if a[i]=us then ss:=ss+1; end; a[i]:=us; i:=1; while a[i]<>'' do i:=i+1; a[i]:=us; k:=' '; begin while k<>l do begin write('Password(A line of a):'); readln(k); if k='exit' then exit; write('Until pa(A line of a):'); j:=0; readln(l); if k=l then break; clrscr; writeln('Passwords do not match!'); writeln('User: ',us); end; b[i]:=k; writeln('Now,let us login!Press input ok'); readln(l); x:=us; y:=k; login; end; end; begin a[1]:='admin'; b[1]:='admin'; clrscr; while x<>'exit' do begin clrscr; writeln('Welcome!If input login then go to the Login page.If input register then go to the register page(If input exit then exit)'); gotoxy(1,3); readln(x); lowercase(x); if x='login' then login; if x='register' then register; if x='exit' then halt; end; end.
1
下一页