
1)
program pr;
uses crt;
Var y,x:real;
Begin
Writeln('vvedite x');
readln(x);
y:=(4*x)/(x-1);
Writeln('y=',y:10:3);
readln;
end.
2)
program pr;
Var n,i,a:integer;
Begin
Writeln('введите кол-во цыфр');
readln(n);
for i:=1 to n do Begin
readln(a);
if (a>9) and (a<1000) and (a mod 10=4) then Writeln(a);
end;
end.
2) использование массива
program pr;
uses crt;
Var n,i:integer;
a:array[1..100] of integer;
Begin
Writeln('Введите кол-во цифр');
readln(n);
Writeln('Введите цифры');
for i:=1 to n do read(a[i]);
Writeln;
for i:=1 to n do
if (a[i]>9) and (a[i]<1000) and (a[i] mod 10=4) then Write(a[i],';');
end.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
#circle {
border-radius: 100px;
width: 100px;
height: 100px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
cursor: pointer;
}
#circle.red {
background-color: red;
}
#circle.green {
background-color: green;
}
#circle.orange {
background-color: orange;
}
</style>
<title>Title</title>
</head>
<body>
<div id="circle" class="red"></div>
<скрипт>
colors = ["red", "green", "orange"]
document.getElementById("circle").addEventListener("click", function(e) {
const element = this;
let currentColor = element.classList.value
if (currentColor === "orange"){
currentColor = colors[0]
} else {
currentColor = colors[colors.indexOf(currentColor)+1]
}
element.classList = currentColor
})
</скрипт>
</body>
</html>
P.S. При загрузке фулл кода выдает ошибку от сайта.. Поэтому на фотке весь код