var
a,b,c,n,i,f,op,ra,sh:longint;
y,cj:char;
e,k,com,sex,con:string[10];
age:integer;
begin
writeln('OK!What is your name?');
readln(e);
writeln('OK!What is your age?');
readln(age);
writeln('OK!What is your sex?');
readln(sex);
writeln('Hello!',e,',which subjust do you want to do? Chinese or Math or English?');
readln(k);
writeln('name: ',e,' age: ',age,' sex: ',sex);
if k='Chinese' then begin
writeln('Please write a compicition about any funny things.(400 word)');
readln(con);
writeln('Good!');
end;
if k='Math' then begin
writeln('Take care:','/',' ','use',' ','div,here.');
f:=0;
write('How many questions do you want to do?');
read(n);
for i:=1 to n do
begin
randomize;
a:=random(100);
b:=random(100);
op:=random(4);
case op of
0: begin y:='+';ra:=a+b;end;
1: begin y:='-';ra:=a-b;end;
2: begin y:='*';ra:=a*b;end;
3: begin y:='/';ra:=a div b;end;
end;
write(a,y,b,'=');
readln(c);
if c=ra then begin writeln('T');f:=f+1;end
else writeln('F');
end;
writeln('Thank you.',e,',your performance is',f/n*100:0:1);
readln
end;
if k='English' then begin
writeln('Please write a compicition about yourself.(100 words)');
while true do begin
begin
readln(com);
randomize;
sh:=random(2);
case sh of
0: cj:='T';
1: cj:='F';
end;
writeln(cj);
if cj='T' then break;
end;
end;
end;
readln
end.
帮我改一改,加些有水平的东东!
a,b,c,n,i,f,op,ra,sh:longint;
y,cj:char;
e,k,com,sex,con:string[10];
age:integer;
begin
writeln('OK!What is your name?');
readln(e);
writeln('OK!What is your age?');
readln(age);
writeln('OK!What is your sex?');
readln(sex);
writeln('Hello!',e,',which subjust do you want to do? Chinese or Math or English?');
readln(k);
writeln('name: ',e,' age: ',age,' sex: ',sex);
if k='Chinese' then begin
writeln('Please write a compicition about any funny things.(400 word)');
readln(con);
writeln('Good!');
end;
if k='Math' then begin
writeln('Take care:','/',' ','use',' ','div,here.');
f:=0;
write('How many questions do you want to do?');
read(n);
for i:=1 to n do
begin
randomize;
a:=random(100);
b:=random(100);
op:=random(4);
case op of
0: begin y:='+';ra:=a+b;end;
1: begin y:='-';ra:=a-b;end;
2: begin y:='*';ra:=a*b;end;
3: begin y:='/';ra:=a div b;end;
end;
write(a,y,b,'=');
readln(c);
if c=ra then begin writeln('T');f:=f+1;end
else writeln('F');
end;
writeln('Thank you.',e,',your performance is',f/n*100:0:1);
readln
end;
if k='English' then begin
writeln('Please write a compicition about yourself.(100 words)');
while true do begin
begin
readln(com);
randomize;
sh:=random(2);
case sh of
0: cj:='T';
1: cj:='F';
end;
writeln(cj);
if cj='T' then break;
end;
end;
end;
readln
end.
帮我改一改,加些有水平的东东!