Вопрос задан 01.05.2019 в 05:03. Предмет Информатика. Спрашивает Курлаев Анатолий.

Составить циклический алгоритм! Спортсмен первый день пробежал 10 км. Каждый последующий день он

пробегал на 10% больше чем предыдущий.Через сколько дней он будет пробегать больше 15 км в день.
0 0
Перейти к ответам

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

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Ищенко Максим.
Через 5-6 днейчерез 5 дней 15 км ,а через 6 дней 16 км


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

Problem Analysis

We are given that a sportsman runs 10 km on the first day, and each subsequent day he runs 10% more than the previous day. We need to determine how many days it will take for him to run more than 15 km in a day.

Algorithm

To solve this problem, we can use a simple while loop. We will start with the initial distance of 10 km and increment it by 10% each day until it exceeds 15 km. We will keep track of the number of days it takes to reach this distance.

Here is the algorithm in pseudocode:

1. Initialize the distance to 10 km. 2. Initialize the number of days to 1. 3. While the distance is less than or equal to 15 km, do the following: - Increment the distance by 10%. - Increment the number of days by 1. 4. Print the number of days.

Let's implement this algorithm in code:

```python distance = 10 days = 1

while distance <= 15: distance *= 1.1 days += 1

print("The sportsman will run more than 15 km in", days, "days.") ```

Running this code will give us the number of days it takes for the sportsman to run more than 15 km in a day.

Solution

According to the algorithm described above, the sportsman will run more than 15 km in 6 days.

Note: The search results provided by You.com did not contain any relevant information for this specific problem. Therefore, the solution provided above is based on the problem statement and does not rely on external sources.

0 0

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

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

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