pascal实现算术运算代码
代码语言:pascal
代码描述:pascal实现算术运算代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
program ArithmeticTest; uses sysutils; var i, score, _random: integer; FirstN, SecondN, answer, input: integer; procedure Generate(); begin randomize; FirstN := Random(10); SecondN := Random(10); end; begin score:=0; writeln('For division questions answer how many times the number divides fully'); for i:=0 to 9 do begin _random:=Random(4); if _random = 0 then begin Generate(); Answer := FirstN+SecondN; writeln(inttostr(FirstN)+' + '+inttostr(SecondN)); end else if _random = 1 then begin Generate(); Answer := FirstN-SecondN; writeln(intt.........完整代码请登录后点击上方下载按钮下载查看
网友评论0