Сделать блок-схему по коду#include #include #include int main (){double a,b,c; std: : cin > > a > > b > > c; double d; d = b*b - 4*a *c; if (d> 0){double x1, x2; x1 = ((-1) *b - sqrt(d)) / (2*a); x2 = ((-1) *b + sqrt(d)) / (2*a); std: : cout < < x1 < < " " < < x2; } if (d==0){ double x; x = (-1) *b/2/a; std: : cout < < x; }}
Объяснение:
Сначала заполним массив, затем выведем его содержимое.
---
Sub Main()
Dim a as Double = 1
Dim b as Double = 15
Dim h as Double = 0.92
Dim n as Integer = int((b - a) / h)
Dim Z() As Double = New Double(n) {}
Dim i as Double
For i = 0 To n
Z(i) = Math.Cos(a + h * i) + Math.Tan(a + h * i)
Next
For i = 0 To n
Console.WriteLine("Z(" & i+1 & ") = " & Z(i))
Next
End Sub
---
Результат работы этой программы:
Z(1) = 2.09771003052304
Z(2) = -3.0884493200958
Z(3) = -1.26594678050156
Z(4) = -0.103295451547362
Z(5) = 30.831517973736
Z(6) = -0.0383774051794511
Z(7) = 1.21343345934296
Z(8) = 2.67822720165008
Z(9) = -2.28928714730523
Z(10) = -1.13533602598861
Z(11) = 0.265586431867902
Z(12) = -7.87130103019394
Z(13) = 0.283584171679959
Z(14) = 1.3388270225723
Z(15) = 4.05676371484264
Z(16) = -1.89632897888172
begin
read(n);
copy_of_n := n;
amount := 0;
max_digit := copy_of_n mod 10;
while copy_of_n <> 0 do
begin {Находим наибольшую цифру в числе}
if max_digit < copy_of_n mod 10
then
max_digit := copy_of_n mod 10;
copy_of_n := copy_of_n div 10;
end;
copy_of_n := n;
while copy_of_n <> 0 do {Считаем количество таких цифр}
begin
if copy_of_n mod 10 = max_digit
then
amount := amount + 1;
copy_of_n := copy_of_n div 10;
end;
writeln(amount);
end.