Program qq;
uses crt;
var A:array [1..20] of integer; i: integer;
begin
for i:=1 to 20 do
readln (a[i]); //ввод массива. Не указали откуда дан массив, так что введем его через enter
for i:=1 to 20 do
if a[i]<10 then
a[i]:=0; //сравним каждый элемент массива с 10. если меньше 10, то заменим на ноль
for i:=1 to 20 do
write (a[i], ' '); //Вывод массива на экран
<span>end.</span>
Первая программа:
<!DOCTYPE html>
<html>
<head>
<style>
body {
text-align: center;
}
form {
display: inline-block;
}
form > button {
width: 100%;
}
</style>
<script>
function Privetstvie()
{
var name1 = "Моё имя";
var name = document.getElementById("Pole_vvoda_imeni").value;
var Pole_vuvoda_privetstviya = document.getElementById("Pole_vuvoda_privetstviya");
if (name === name1)
{
Pole_vuvoda_privetstviya.innerHTML = "Привет мне!";
} else {
Pole_vuvoda_privetstviya.innerHTML = "Привет, незнакомец";
}
}
</script>
</head>
<body>
<form>
<div>
<label for="Pole_vvoda_imeni">Пожалуйста, введите своё имя:</label>
<input id="Pole_vvoda_imeni" type="text">
</div>
<button type="button" onClick="Privetstvie();">Поздароваться</button>
<div id="Pole_vuvoda_privetstviya"></div>
</form>
</body>
</html>
____________________________________________
Вторая программа:
<!DOCTYPE html>
<html>
<head>
<style>
body {
text-align: center;
}
form {
display: inline-block;
}
form > button {
width: 100%;
}
</style>
<script>
function Privetstvie()
{
var name1 = "Моё имя";
var name2 = "Имя друга";
var name3 = "Имя другого друга";
var name = document.getElementById("Pole_vvoda_imeni").value;
var Pole_vuvoda_privetstviya = document.getElementById("Pole_vuvoda_privetstviya");
switch (name)
{
case name1:
Pole_vuvoda_privetstviya.innerHTML = "Привет, мне!";
break;
case name2:
Pole_vuvoda_privetstviya.innerHTML = "Привет, "+name2+"!";
break;
case name3:
Pole_vuvoda_privetstviya.innerHTML = "Привет, "+name3+"!";
break;
default:
Pole_vuvoda_privetstviya.innerHTML = "Привет, незнакомец";
}
}
</script>
</head>
<body>
<form>
<div>
<label for="Pole_vvoda_imeni">Пожалуйста, введите своё имя:</label>
<input id="Pole_vvoda_imeni" type="text">
</div>
<button type="button" onClick="Privetstvie();">Поздароваться</button>
<div id="Pole_vuvoda_privetstviya"></div>
</form>
</body>
</html>
Var
a, b, c, min : integer;
begin
read (a, b, c);
if (a <= b) and (a <= c) then min := a
else if (b <= a) and (b <= c) then min := b
else min := c;
write (min);
end.
Ответ е2)
муравей двигается по полю