6 mod 4 = 2
6 mod 3 = 0
6 mod 9 = 9
2+6 mod 4 = 2+2 = 4
(2+6) mod 4 = 8 mod 4 = 0
Function min(a As Double, b As Double) As Double
Dim a1 As Double, b1 As Double, ab As Double, z As Integer
z = Sgn(Abs(a - b))
a1 = Abs(a)
b1 = Abs(b)
ab = a1 + b1
a1 = a + ab
b1 = b + ab
min = a * Sgn(Int(b1 / a1)) * z + b * Sgn(Int(a1 / b1)) * z
End Function
Function negcube(x As Double, y As Double, z As Double)
Dim i As Double
i = (x - Abs(x)) / 2
x = x + (x * x - 1) * i
i = (y - Abs(y)) / 2
y = y + (y * y - 1) * i
i = (z - Abs(z)) / 2
z = z + (z * z - 1) * i
End Function
Excel VBA
З пишется перед звонких согласных а с перед глухими
<span><span><span>
a =
1075
</span><span>
b =
750
</span><span>
a=
1082
</span></span></span>
program raf105;
const
n = 10; //Размер массива
var
a:array[1..n] of integer;
i,pro: integer;
begin
pro:= 1;
writeln('Вводите ',n,' чисел по очереди');
for i:=1 to n do
begin
readln(a[i]);
if (a[i] mod 2 = 0) or (a[i] mod 5 = 0)
then pro:= pro*a[i];
end;
writeln('Произведение чисел кратных двум или пяти: ',pro);
end.
<h3><u>PascalABC 3.4.2</u></h3>