Первая
var n,x:integer;
begin
readln(n);
while n <> 0 do begin
x:=x + n mod 10;
n:=n div 10;
end;
if(x mod 2 = 0) then
writeln('true')
else
writeln('false');
end.
Вторая
var x,z,s:integer;
begin
readln(x);
if (x > 99) and (x < 1000) then begin
s:=x;
while s<>0 do begin
z:=z+s mod 10;
s:=s div 10;
end;
if(x*x) = (z*z*z) then
writeln('true')
else
writeln('false');
end
else
writeln('Число должно быть 3-ех значным!');
end.
Третья
Var a,b,c:Real;
Begin
Writeln('Введите a');
Readln(a);
Writeln('Введите b');
Readln(b);
Writeln('Введите c');
Readln(c);
if (a=b) or (a=c) or (b=c) then
writeln ('true')
else
writeln ('false);
end.
Первая
var n,x:integer;
begin
readln(n);
while n <> 0 do begin
x:=x + n mod 10;
n:=n div 10;
end;
if(x mod 2 = 0) then
writeln('true')
else
writeln('false');
end.
Вторая
var x,z,s:integer;
begin
readln(x);
if (x > 99) and (x < 1000) then begin
s:=x;
while s<>0 do begin
z:=z+s mod 10;
s:=s div 10;
end;
if(x*x) = (z*z*z) then
writeln('true')
else
writeln('false');
end
else
writeln('Число должно быть 3-ех значным!');
end.
Третья
Var a,b,c:Real;
Begin
Writeln('Введите a');
Readln(a);
Writeln('Введите b');
Readln(b);
Writeln('Введите c');
Readln(c);
if (a=b) or (a=c) or (b=c) then
writeln ('true')
else
writeln ('false);
end.
#include <iostream>
#include <time.h>
#include<cstdlib>
#include <iomanip>
using namespace std;
int main() {
setlocale(LC_ALL, "rus");
srand(time(NULL));
int m, n; //ЧИСЛЛО СТРОК , СТОЛБЦОВ
int S=1; // БУДУЩЕЕ ПРОИЗВЕДЕИЕ
cin >> m >> n; // ВВОДИМ ИХ
int A[m][n]; //ОБЪЯВЛЯЕМ МААССИВ
for (int i = 0; i < m; i++) { // ЦИКЛ ЗАПОЛНЕНИЯ МАССИВА СЛУЧАЙНЫМИ ЧИСЛАМИ
for (int j = 0; j < n; j++) {
A[i][j] = rand()%200 - 100;
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {// ЦИКЛ ВЫПОЛНЕНИЯ УСЛОВИЯ
if (A[i][j]<0&&j%2==1){
if (i%2==0){
S=S*A[i][j];
}
}
}
}
for (int i = 0; i < m; i++) {// ВЫВОД МАССИВА
for (int j = 0; j < n; j++) {
cout << setw(3)<<A[i][j]<< " ";
}
cout << endl ;
}
cout << endl << S;// ВЫВОД ПРОИЗВЕДЕНИЯ
return 0 ;
}