Var
a:array[1..9] of boolean;
cnt,tmp,cur,all, i:integer;
begin
Writeln('Введите "0", чтобы закончить тестирование досрочно');
for i:= 1 to 9 do begin
tmp:= 1 + random(9);
while a[tmp] = true do
tmp:= 1 + random(9);
Write('8 * ',tmp,' = ');
Read(cur); if cur = 0 then break;
all:= all+1;
if cur = 8*tmp then cnt:=cnt+1 else writeln('Wrong: ', 8*tmp);
a[tmp]:=true;
end;
Writeln(cnt,'/',all);
end.
<u>Пример:</u>
Введите "0", чтобы закончить тестирование досрочно
8 * 8 = 64
8 * 3 = 24
8 * 5 = 45
Wrong: 40
8 * 7 = 0
2/3
Напиши б,в,г только словами
Sub abc()
Dim i As Integer, aMax As Integer, aMin As Integer, n As Integer
n = 15
ReDim a(1 To n) As Integer
For i = 1 To n
a(i) = InputBox("Введи A[" & Str(i) & " ] как целое")
Next i
aMax = a(1)
aMin = a(1)
For i = 2 To n
If a(i) > aMax Then aMax = a(i)
If a(i) < aMin Then aMin = a(i)
Next i
MsgBox "Сумма max+min =" & Str(aMax + aMin) & _
" их разность =" & Str(aMax - aMin)
End Sub
ИК-порт:пульт-телевизор.
Bluetooth: Мобильный телефон