Дошик58694
17.01.2022 12:42

Упростить запись множества. Расписать пошагово


Упростить запись множества. Расписать пошагово

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
anastasiarazumeeva
04.10.2020 14:01
Var
    i1, i2, i3, i4, i5, i6: byte;
    k: Longint;

begin
    for i1 := 0 to 9 do
        for i2 := 0 to 9 do
            for i3 := 0 to 9 do
                for i4 := 0 to 9 do
                    for i5 := 0 to 9 do
                        for i6 := 0 to 9 do
                            if i1 + i2 + i3 = i4 + i5 + i6 then begin
                                Writeln(i1, i2, i3, i4, i5, i6);
                                k := k + 1;
                            end;
    writeln(k);
end.

var
    money: array[1..7]of integer;
    count: array[1..7]of integer;
    s, i: integer;

begin
    money[1] := 1;
    money[2] := 2;
    money[3] := 5;
    money[4] := 10;
    money[5] := 50;
    money[6] := 100;
    money[7] := 500;
   
    write('s = ');
    readln(s);
   
    i := 7;
    repeat
        if s >= money[i] then begin
            s := s - money[i];
            count[i] := count[i] + 1;
        end
        else i := i - 1;
    until s <= 0;
   
    for i := 7 downto 1 do
        if count[i] > 0 then
            writeln(money[i], ' p. = ', count[i], ' шт.')
end.
0,0(0 оценок)
Ответ:
К5О5Т5
18.08.2022 09:02
Var
 d,m,i,all:integer;
begin
 read(d,m);
 all:=0;
 for i:=12 downto (m+1) do
 begin
  if i=12 then
   all:=all+31;
  if i=11 then
   all:=all+30;
  if i=10 then
   all:=all+31;
  if i=9 then
   all:=all+30;
  if i=8 then
   all:=all+31;
  if i=7 then
   all:=all+31;
  if i=6 then
   all:=all+30;
  if i=5 then
   all:=all+31;
  if i=4 then
   all:=all+30;
  if i=3 then
   all:=all+31;
  if i=2 then
   all:=all+28;
  if i=1 then
   all:=all+31;
 end;
 if i=12 then
   all:=all+31-d;
  if i=11 then
   all:=all+30-d;
  if i=10 then
   all:=all+31-d;
  if i=9 then
   all:=all+30-d;
  if i=8 then
   all:=all+31-d;
  if i=7 then
   all:=all+31-d;
  if i=6 then
   all:=all+30-d;
  if i=5 then
   all:=all+31-d;
  if i=4 then
   all:=all+30-d;
  if i=3 then
   all:=all+31-d;
  if i=2 then
   all:=all+28-d;
  if i=1 then
   all:=all+31-d;
 writeln(all);
end.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота