Вопрос задан 02.05.2019 в 10:45. Предмет Информатика. Спрашивает Гавриш Лев.

Очень срочно.....помогите пожалуйста паскальОпределить,можно ли сделать круглую заготовку с

заданным радиусом R из квадратного листа фанеры с заданной стороной А. решить ее надо с помощью оператора выбора case
0 0
Перейти к ответам

Ответы на вопрос

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Рогачёва Маша.
Var
  a, r : Integer;
begin
  Write('a = ');
  Readln(a);

  Write('r = ');
  Readln(r); 

  case a div r of 
    0..1: Writeln('no');    
    else  Writeln('yes');
  end;

  Readln;
end.
0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Can a circular blank with a given radius be made from a square plywood sheet with a given side length using the case selection operator in Pascal?

To determine if it is possible to make a circular blank with a given radius R from a square plywood sheet with a given side length A using the case selection operator in Pascal, we need to consider the geometric properties of the shapes involved.

A circular blank with radius R can be inscribed within a square with side length A if the diameter of the circle is less than or equal to the diagonal of the square. The diagonal of a square can be calculated using the formula: diagonal = A * sqrt(2).

Therefore, to determine if it is possible to make a circular blank with a given radius R from a square plywood sheet with a given side length A, we can compare the diameter of the circle (which is twice the radius, 2R) with the diagonal of the square (A * sqrt(2)) using the case selection operator in Pascal.

Here is an example code snippet in Pascal that demonstrates this logic:

```pascal program CircularBlank; var R, A, diagonal: real; begin writeln('Enter the radius of the circular blank (R): '); readln(R); writeln('Enter the side length of the square plywood sheet (A): '); readln(A); diagonal := A * sqrt(2); case 2 * R <= diagonal of true: writeln('It is possible to make a circular blank with radius ', R:0:2, ' from a square plywood sheet with side length ', A:0:2); false: writeln('It is not possible to make a circular blank with radius ', R:0:2, '

0 0

Топ вопросов за вчера в категории Информатика

Последние заданные вопросы в категории Информатика

Задать вопрос