verynzik66525
?>

Среди трехзначных натуральных чисел вывести в строчку те, у которых все цифры различны

Информатика

Ответы

Ruslan374
Var
   A,b,c,d:integer;
Begin
For A:= 100 to 999 do
    Begin
    b:=A div 100;
    c:=(A div 10) mod 10;
    d:=A mod 10;
    if (b<>c)and(b<>d)and(c<>d) then Write(A,' ')
    End;
End.
evlampin
Чтобы квадрат вписался в круг, его диагональ должна быть равна диаметру круга. Если трактовать "уместиться" как "пролезть", то диагональ должна быть меньше диаметра..
Формулы площадей квадрата  S₁ и круга S₂ известны, что легко позволяет нам найти нужное условие.
\displaystyle S_1=a^2 \to a=\sqrt{S_1}; \ d=a \sqrt{2}= \sqrt{2S_1} \\ S_2=\frac{\pi D^2}{4} \to D=\sqrt{\frac{4S_2}{\pi}}; \\ d\ \textless \ D \to \sqrt{2S_1}\ \textless \ \sqrt{\frac{4S_2}{\pi}}; \ 2S_1\ \textless \ \frac{4S_2}{\pi} \ \to \ \boxed{\pi s_1\ \textless \ 2S_2}
Если нужно, чтобы случай, когда квадрат вписан в круг тоже учитывался, строгое неравенство следует заменить нестрогим.

// PascalABC.NET 3.0, сборка 1160 от 05.02.2016
begin
  var s1:=ReadReal('Площадь квадрата');
  var s2:=ReadReal('Площадь круга');
  if pi*s1<2*s2 then Writeln('Квадрат умещается в круге')
  else Writeln('Квадрат не умещается в круге')
end.

Тестовое решение:
Площадь квадрата 24.6
Площадь круга 28.4
Квадрат не умещается в круге
Gulyaev_Egorkina
  present simple общие does he go to school every day? does she really like singing? is it cold today? do cats catch mice? has he got a real friend? альтернативные does she go to shool every day or once a month? do cats catch mice or dogs? is the earth round or square? is russia bigger or smaller than other countries? does he like skiing or skating? специальные what does he do at school every day? who likes dancing? when does winter come? where does she live? what does she always wait for? present progressive общие is it raining now? is the sun shining at the moment? is he writing his composition now? are they swimming in the pool at the moment? are you doing your homework? альтернативные are you doing your homework or watching tv now? is it raining or snowing now? are they flying to italy or to canada now? is he reading a book or a web-page? is she clever or not? специальные what is she looking forward for? where are they going to go next summer? when is he leaving for france? whom is she writing an e-mail? what are they doing now?

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Среди трехзначных натуральных чисел вывести в строчку те, у которых все цифры различны
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

efimov33
Gstoremsk62
m-zolotukhina2
Стародубцева_Васильевич485
Наталья
Ruzalina_Svetlana1435
katrin50
beyound2006193
Irina
kayrina
aza2103
dashasnegirva
zaotar2008
nash-crimea2019
frsergeysavenok