По данному алгоритму составьте блок-схему:
Пример программного алгоритма
172
179
Ответы на вопрос:
Язык vba: function bin(s as string, z as integer) as string dim c as integer dim oct as integer c = val(s) do oc = c mod 2 c = c \ 2 bin = bin & str(oc) loop until c = 0 bin = strreverse(bin) if z = -1 then bin = "-" & bin end function sub z() dim s as string, s1 as string dim n as integer, i as integer, z as integer dim max s = inputbox("введите строку: ") max = null i = 1 do while i < = len(s) select case mid(s, i, 1) case 0 to 9 if z = 0 and i > 1 then z = iif(mid(s, i - 1, 1) = "-", -1, 1) else: z = 1 end if s1 = s1 + mid(s, i, 1) if i = len(s) then gosub 1 case else: if s1 < > "" then gosub 1 end select i = i + 1 loop msgbox ("max=" & max) end 1: n = z * val(s1) msgbox (n & "; двоичная форма: " & bin(s1, z)) if isnull(max) then max = n if max < n then max = n z = 0 s1 = "" return end sub
Популярно: Информатика
-
tapilina9211.05.2022 09:52
-
GEgor00402.07.2020 19:42
-
Engineeeer12.03.2020 12:17
-
Marinkasmirnova25.06.2020 23:58
-
гагарин904.07.2022 23:46
-
dinbili405.03.2023 16:55
-
olinka601.09.2022 00:00
-
артурик1421.10.2022 21:15
-
алиса76815.08.2021 16:38
-
PolinaRa161020071009.01.2021 15:00