У меня так получилось
a:=9
b:=3
c:=1
1. a=b - нет
2. c:=1+(a-b)
a:=a-1
b:=b+1
c:=7
a:=8
b:=4
3.a=b - нет
4.c:=4
a:=7
b:=5
5.a=b - нет
6.c:=3
a:=6
b:=6
7.a=b - да
И выведет конечный результат
a:=6
b:=6
c:=3
Var a,b,c,min:integer;
begin
write('Введите a: ');
readln(a);
min:=a;
write('Введите b: ');
readln(b);
if b<min then min:=b;
write('Введите c: ');
readln(c);
if c<min then min:=c;
writeln('Наименьшее: ',min);
<span>end.
Для VBA
Sub Z()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim min As Integer
</span>a = InputBox("Введите A: ")<span>
min = a
b = InputBox("</span>Введите <span>B: ")
If b < min Then min = b
c = InputBox("</span>Введите <span>C: ")
If c < min Then min = c
MsgBox ("Наименьшее: " & min)
End Sub
Для наибольшего
</span>Sub Z()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim max As Integer
a = InputBox("Введите A: ")
max= a
b = InputBox("Введите B: ")
If b > max Then max = b
c = InputBox("Введите C: ")
If c > max Then max = c
MsgBox ("Наибольшее: " & max )
End Sub
Begin
kk:=0;
for i:=1 to 15 do begin
a[i]:=random(1)+20;
if(a[i]>10)then inc(kk);
end;
end;