М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
Ferz686
Ferz686
07.12.2022 18:25 •  Информатика

Дано действительное число x< 10. получить целую и пробную часть числа x.

👇
Ответ:
kseniya20072
kseniya20072
07.12.2022

#Ruby 2.4.1

def getFract(n)

   return [n % 1, n - n % 1]

end

p getFract(78.95)

4,8(28 оценок)
Открыть все ответы
Ответ:
bershteindanik
bershteindanik
07.12.2022

var i,j,n,k,k1,k2,k3: integer; bb: boolean;

a: array of integer;

begin

write('N = ');

readln(n);

if ((n mod 3 = 0) and (n<>0)) then begin

write('K1 = ');

readln(k1);

write('K2 = ');

readln(k2);

write('K3 = ');

readln(k3);

setlength(a,n);

for i:=0 to n-1 do begin

write('Заполним номер ',i+1,' -> ');

readln(a[i]);

end;

i:=0;

while (i<n) do

begin

a[i]:=k1-a[i];

a[i+1]:=k2-a[i+1];

a[i+2]:=k3-a[i+2];

inc(i,3);

end;

write('K = ');

readln(k);

for i:=0 to n-2 do

if (a[i]+a[i+1]>=k) then begin write('В комнатах ',i+1,' и ',i+2,' есть ',a[i]+a[i+1],' свободных мест'); bb:= true; end;

if (bb=false) then writeln(0);

end else writeln('Введите число кратное 3 и неравное 0');

readln;

end.

4,4(15 оценок)
Ответ:
Dildora13
Dildora13
07.12.2022

Робот:

var canvas = document.getElementById('cl');

var ctx = canvas.getContext('2d');

ctx.fillStyle = 'orange';

ctx.fillRect(25, 0, 10, 10);

ctx.fillStyle = 'blue';

ctx.fillRect(27, 2, 2, 2);

ctx.fillRect(31, 2, 2, 2);

ctx.fillStyle = 'purple';

ctx.fillRect(29, 10, 2, 5);

ctx.fillStyle = 'black';

ctx.fillRect(15, 15, 30, 2);

ctx.fillStyle = 'grey';

ctx.fillRect(22.5, 15, 15, 20);

ctx.fillStyle = 'green';

ctx.fillRect(22.5, 35, 2, 15);

ctx.fillRect(35.5, 35, 2, 15);

Стикмэн:

ctx.fillStyle = 'black';

ctx.strokeRect(25, 50, 10, 10);

ctx.fillStyle = 'blue';

ctx.fillRect(29, 60, 2, 28);

ctx.beginPath();  

ctx.lineWidth="2";

ctx.strokeStyle="black";

ctx.moveTo(29,70);

ctx.lineTo(40,62);

ctx.stroke();

ctx.beginPath();  

ctx.lineWidth="2";

ctx.strokeStyle="black";

ctx.moveTo(30,70);

ctx.lineTo(20,62);

ctx.stroke();

ctx.beginPath();  

ctx.lineWidth="2";

ctx.strokeStyle="black";

ctx.moveTo(30,86);

ctx.lineTo(20,95);

ctx.stroke();

ctx.beginPath();  

ctx.lineWidth="2";

ctx.strokeStyle="black";

ctx.moveTo(29,86);

ctx.lineTo(40,95);

ctx.stroke();

И да,надеюсь ты разбираешься в Javascript`е и знаешь что как.

4,8(81 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ