Ab c = 0 0 0 0 0 1 0 0 1 1 2 0 1 0 0 3 0 1 1 1 4 1 0 0 1 5 1 0 1 1 6 1 1 0 1 7 1 1 1 1 def bin_values(in_int): ret = [] b = bin(in_int)[2: ] while len(b) ! = 3: b = '0' + b for i in b: ret.append(bool(int( return ret for xs in range(2**3): a, b, c = bin_values(xs) print(xs) res = a and not c or c and (b or not c) or (a or not b) and c print(int(a), int(b), int(c), int(res), "\n")
Спасибо
Ответ дал: Гость
var c,a,b,i,j,l: integer; begin cls;
write('введите через пробел отрезок'); read(a,b); for i: =a to b+1 do begin j: =2; l: =round(sqrt(i)); while (i mod j < > 0) and (j < = l) do begin inc(j); end; if (j > l) then begin write(c,' '); c: =i; end; end; end.
Ответ дал: Гость
var
a: array[1..5]of integer;
i: integer;
begin
for i: =1 to 5 do read(a[i]);
for i: =1 to 5 do write(a[i],' ');
writeln;
for i: =1 to 5 do if a[i]> =1024 then writeln(a[i] div 1024);
writeln;
end.
Другие вопросы по: Информатика
Похожие вопросы
Знаешь правильный ответ?
Постройте таблицу истинности a ∧ ¬ c ∨ c ∧ (b ∨ ¬ c) ∨ (a ∨ ¬ b) ∧ c . заранее !...
Популярные вопросы