Var
a: array [1..10] of integer;
i, n: byte;
begin
Randomize;
for i:=1 to 10 do
begin
a[i]:=random(100)-50;
n:=abs(a[i] mod 10);
if (n = 4) or (n = 8) then write(a[i]:4);
end;
readln;
<span>end.</span>
Int _tmain(int argc, _TCHAR* argv[])
{<span>
int s, rashod, ben;</span>
<span> printf("Расстояние до дачи (км): \n", s);</span><span>
printf("Расход бензина ( литров на 100 км пробега): \n", rashod);</span><span>
printf("Цена литра бензина (руб.): \n", ben);</span><span>
printf("Поездка на дачу и обратно обойдется в \n", (2*s/100)*rashod*ben);</span>
<span> return 0;
</span><span>}
s - расстояние
rashod - расход
ben - цена 1 литра</span>
Program z1;
Var k:integer;
Begin
Readln(k);
Writeln('1');
End.
Function max(a As Double, b As Double) As Double
Dim i, j, k, l As Integer
k = Sgn(a - b)
l = k * k
i = l * (l + k) / 2
j = l * (l - k) / 2
max = a * i + b * j
End Function
Function min(a As Double, b As Double) As Double
Dim i, j, k, l As Integer
k = Sgn(b - a)
l = k * k
i = l * (l + k) / 2
j = l * (l - k) / 2
min = a * i + b * j
End Function
Excel VBA