Вопрос задан 29.04.2019 в 09:00. Предмет Информатика. Спрашивает Ращупкіна Марічка.

Помогите напишите задачу и ее решение в паскале. Составить программу для решения следующей задачи:

Гражданин 1 марта открыл счет в банке, вложив 1000 руб. Через каждый месяц размер вклада увеличивается на 2% от имеющейся суммы. Определить за какой месяц величина ежемесячного увеличения вклада превысит 30 руб.
0 0
Перейти к ответам

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

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Губина Настя.
Var d:integer;
c,a:real;
begin
a:=1000;
d:=0;
while a <=1030 do begin
c:=a/100*2;
a:=a+c;
d:=d+1;
end;
writeln('величина ежемесячного увеличения вклада превысит 30 руб за ',d,' месяца');
end.
0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Task Description

The task is to create a program in Pascal to solve the following problem: A citizen opened a bank account on March 1st, depositing 1000 rubles. Each month, the deposit amount increases by 2% of the existing sum. The program needs to determine in which month the monthly increase in the deposit will exceed 30 rubles.

Pascal Program

Here's a Pascal program to solve the given problem:

```pascal program BankDeposit;

var deposit, monthlyIncrease: real; month: integer;

begin deposit := 1000; month := 0; repeat month := month + 1; monthlyIncrease := deposit * 0.02; deposit := deposit + monthlyIncrease; until monthlyIncrease > 30; writeln('The monthly increase in the deposit will exceed 30 rubles in month ', month); end. ```

In this program: - We initialize the deposit amount to 1000 rubles and set the month counter to 0. - Using a repeat-until loop, we calculate the monthly increase in the deposit by multiplying the current deposit by 0.02 (2%) and then add this increase to the deposit amount. - The loop continues until the monthly increase exceeds 30 rubles, at which point it prints the month when this happens.

This program will provide the month in which the monthly increase in the deposit exceeds 30 rubles.

I hope this helps! If you have any further questions or need additional assistance, feel free to ask.

0 0

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

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

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