Violettka181
25.08.2022 03:07

Дан фрагмент таблицы истинности выражения f проверить все строки на выполнения истиности


Дан фрагмент таблицы истинности выражения f проверить все строки на выполнения истиности

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
fgdhdrbnh
25.04.2023 00:39

var

i, a, b, n, n2, j: longint;

s: string;

flag: boolean;

begin

Write('Введите через пробел границы диапазона: ');

Readln(a, b);

if b < a then begin n := a; a := b; b := n end;

if a < 11 then a := 11;

for i := a to b do

begin

Str(i, s);

n := Length(s); n2 := n div 2; flag := true; j := 1;

repeat

flag := (s[j] = s[n - j + 1]);

j := j + 1

until (not flag) or (j > n2);

if flag then Write(i, ' ')

end;

end.

Тестовое решение:

Введите через пробел границы диапазона: 800 1500

808 818 828 838 848 858 868 878 888 898 909 919 929 939 949 959 969 979 989 999

Объяснение:

0,0(0 оценок)
Ответ:
Игорь2285
17.11.2021 00:33

 if (N mod 2 <> 0) and (N mod 3 = 0) then

 if ((N >= 345) and (N < 543)) or (N mod 7 = 0) then

 if (N mod 3 = 0) or (N mod 10 = 0) then

 if (N >= 231) and (N < 312) and (N mod 3 <> 0) then

 if (N mod 2 <> 0) and (N div 10 mod 10 <= 5) then

 if (N > 9) and (N < 100) and (N mod 10 = N div 10) then

 if (N mod 10 = 4) and (N div 100 mod 10 > 3) then

 if (N > 9) and (N < 100) and (N div 10 mod 2 <> 0) then

 if (N mod 2 = 0) and (N div 10 mod 10 > 5) then

 if (N > 99) and (N < 1000) and (N div 100 = 8) then

 if (a mod 2 = 0) or (b mod 2 = 0) then

 if (a + b > 56) and (a + b < 145) then

 if (a mod 10 = 6) and (b mod 10 = 6)

 if (a > 0) and (b > 9) and (b < 100) then  

 if (a div 10 mod 10 < 5) or (b div 100 mod 10 > 3) then  

 if (a mod 3 = 0) or (b mod 5 <> 0) then

 if (a > 0) and (b >= 0) then

 if (a > 100) or (b > 100) then  

 if (a mod 8 > 4) and (b mod 12 < 5) then  

 if (a mod 2 <> 0) and (b mod 2 <> 0) then

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота