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