1) var i,n,k:integer; a:array[1..10] of integer; begin for i:=1 to 10 do read(a[i]); writeln; for i:=10 downto 1 do write(a[i],' '); readln; readln end. 3) var i,n,k:integer; a:array[1..10] of integer; begin for i:=1 to 10 do read(a[i]); writeln; writeln((a[5]+a[6])/2:0:2); readln; readln end. 4) var i,n,k,min:integer; a:array[1..10] of integer; begin for i:=1 to 10 do begin read(a[i]); if (a[i] mod 10=4) or (a[i] mod 10=-4) then min:=a[i];
for i:=1 to 10 do if ((a[i] mod 10=4) or (a[i] mod 10=-4)) and (a[i]<min) then min:=a[i]; writeln(min); end.
5) var i,n,k,max:integer; a:array[1..10] of integer; begin max:=0; for i:=1 to 10 do begin read(a[i]); if (a[i] mod 5=0) and (a[i]>max) then max:=a[i]; end; writeln(max); end.
#include "stdafx.h"#include<conio.h>#include"iostream"#include "stdio.h"#include "time.h"
using namespace std;
int main(){ int x, y,c; setlocale(LC_ALL, "RUS"); srand((unsigned)time(NULL)); x = rand() % 8 + 2; y = rand() % 8 + 2; cout << "Сколько будет " << x << "*" << y << "?" << "\n"; cout << "Введите ответ и нажмите Enter "; cin >> c; if (x*y == c) { cout << "Правильно\n"; } else { cout << "Вы ошиблись " << x << "*" << y << "=" << c; } return 0;}
var i,n,k:integer;
a:array[1..10] of integer;
begin
for i:=1 to 10 do
read(a[i]);
writeln;
for i:=10 downto 1 do
write(a[i],' ');
readln;
readln
end.
3)
var i,n,k:integer;
a:array[1..10] of integer;
begin
for i:=1 to 10 do
read(a[i]);
writeln;
writeln((a[5]+a[6])/2:0:2);
readln;
readln
end.
4)
var i,n,k,min:integer;
a:array[1..10] of integer;
begin
for i:=1 to 10 do
begin
read(a[i]);
if (a[i] mod 10=4) or (a[i] mod 10=-4)
then min:=a[i];
for i:=1 to 10 do
if ((a[i] mod 10=4) or (a[i] mod 10=-4)) and (a[i]<min)
then min:=a[i];
writeln(min);
end.
5)
var i,n,k,max:integer;
a:array[1..10] of integer;
begin
max:=0;
for i:=1 to 10 do
begin
read(a[i]);
if (a[i] mod 5=0) and (a[i]>max)
then max:=a[i];
end;
writeln(max);
end.