Вопрос задан 16.02.2019 в 06:30. Предмет Информатика. Спрашивает Арамян Гайк.

Помогите пожалуйстаЛБ- 72 Разработайте алгоритм для вычисления площади поверхности цилиндра: s =

2πr(h + r); где r – радиус основания,h – его высота.ВБ- 69 Разработайте схему алгоритма для нахождения min(a, b, c) целых чисел a, b, c.ЦА-12Разработайте схему алгоритма для вычисления суммы S целых четных чисел на отрезке [a,b]. Текущее значение целого числа имеет имя i.
0 0
Перейти к ответам

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

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Медведева Диана.
1)Алгоритм решения задачи: Программа должна запрашивать у пользователя следующую информацию:диаметр бака;высота бака;расход краски (площадь поверхности, которую можно покрасить одной банкой краски).В результате программа должна выдавать количество требуемых банок. При получении дробного числа округление должно всегда происходить в большую сторону.Площадь крыши бака (круга) вычисляется по формуле p * d2 /4 (где p – число пи, d - диаметр).
Площадь боковой поверхности цилиндра: p * d * h (где h – высота).
Программа на языке Паскаль: 
const pi = 3.14;  
var d, h, b: real;
     top, wall, q: real;
     q_int: integer;  
begin write('Диаметр: ');
readln(d); write('Высота: ');
readln(h);
write('Окрашиваемая площадь одной банкой: ');
readln(b);  
     top := pi * sqr(d) / 4.0;
    wall := pi * d * h;
     q := (top + wall) / b;
    q_int := trunc(q) + 1;  
write('Количество банок: ', q_int);  
readln
end.

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

Algorithm for Calculating the Surface Area of a Cylinder

To calculate the surface area of a cylinder, you can use the formula:

s = 2πr(h + r)

where: - s is the surface area of the cylinder, - r is the radius of the base, and - h is the height of the cylinder.

Here is an algorithm that calculates the surface area of a cylinder using the given formula:

1. Read the values of r and h. 2. Calculate s using the formula: s = 2 * π * r * (h + r). 3. Print the value of s as the surface area of the cylinder.

Here is the algorithm in pseudocode:

``` Read r Read h s = 2 * π * r * (h + r) Print s ```

Please note that in the above algorithm, the value of π is assumed to be a constant.

Algorithm for Finding the Minimum of Three Integers

To find the minimum of three integers a, b, and c, you can use the following algorithm:

1. Read the values of a, b, and c. 2. Initialize a variable min_value with the value of a. 3. If b is less than min_value, update min_value to the value of b. 4. If c is less than min_value, update min_value to the value of c. 5. Print the value of min_value as the minimum of the three integers.

Here is the algorithm in pseudocode:

``` Read a Read b Read c min_value = a if b < min_value, then min_value = b if c < min_value, then min_value = c Print min_value ```

Algorithm for Calculating the Sum of Even Integers in a Range

To calculate the sum of even integers in a range [a, b], you can use the following algorithm:

1. Read the values of a and b. 2. Initialize a variable sum with the value 0. 3. Iterate through each integer i in the range [a, b]. 4. If i is an even number, add i to sum. 5. Print the value of sum as the sum of even integers in the range [a, b].

Here is the algorithm in pseudocode:

``` Read a Read b sum = 0 for i = a to b if i is even, then sum = sum + i Print sum ```

Please note that in the above algorithm, the range [a, b] includes both a and b.

0 0

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

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

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