Поделитесь своими знаниями, ответьте на вопрос:
Sub макрос5() ' ' макрос5 макрос ' ' dim number as long dim names as string number = inputbox("введите номер курсанского") names = inputbox("введите фамилию имя отчество") dim sa as double dim step as long dim min_num as integer sa = number mod 10 step = 10 do dim this_num as integer this_num = ((number - number mod step) mod (step * 10)) / step sa = (sa + this_num) / 2 step = step * 10 loop while step < number first_space_index = instr(1, names, " ") last_space_index = instrrev(names, " ", len(names)) len_first_word = len(left(names, first_space_index - 1)) len_second_word = last_space_index - 1 - first_space_index len_third_word = len(names) - last_space_index if len_first_word < = len_second_word then if len_frist_word < = len_third_word then min_num = len_first_word else min_num = len_third_word end if elseif len_second_word < = len_third_word then min_num = len_second_word else min_num = len_third_word end if selection.wholestory dim words_count as integer words_count = selection.words.count selection.homekey unit: =wdstory for i = 1 to words_count selection.moveright unit: =wdword, count: =1, extend: =wdextend if len(selection.text) < = sa then selection.font.size = 18 selection.font.colorindex = wdred selection.font.spacing = 3 selection.font.bold = true end if if len(selection.text) > = min_num then selection.text = " okay " end if selection.moveright unit: =wdcharacter, count: =1 next i end sub разобраться в макросепоясните каждое действиезаранее огромное !
ответ: 91) 92) -1.
объяснение:
можно данную дробь разложить на слагаемые и найти зависимость между а и по сути решить квадратное уравнение относительно (а)
(a^2-6b^2) / (ab) = (a^2/(ab)) - (6b^2/(ab)) = (a/b) - (6b/a)
можно сделать замену:
t=a/b > 0 (по условию)
t - 6/t = -1
t^2 + t - 6 = 0 по т.виета корни
(-3) и (2) отрицательный корень - посторонний
a/b = 2 ---> a = 2b
осталось подставить и
(4b^2+8b^2) / (2*2b*b) = 12b^2 / (4b^2) = 12/4 = 3
или без замены:
из данного равенства получим
a^2 - 6b^2 = -ab
a^2 + ab - 6b^2 = 0
d=b^2+24b^2=(5b)^2
a1 = (-b-5b)/2 = -3b не подходит по условию: a и b одного
а2 = (-b+5b)/2 = 2b
получилось то же
номер 92 аналогичен)