Вопрос задан 05.05.2019 в 05:41. Предмет Информатика. Спрашивает Ризванов Ильзир.

Программа паскаль Человек хочет положить деньги в банк под a% годовых на b лет. Посчитать и вывести

на экран суммы, которые он может получить по истечении каждого из этих лет.
0 0
Перейти к ответам

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

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Левин Стас.
Uses crt;var a,b,c,s:real;beginclrscr;write('Введите сумму:');readln(c);write('Введите проценты:');readln(a);write('Введите количество лет:');readln(b);s:=(c+b*((a*100)/c));Writeln('Вы получите:',s);end.
0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Calculating Interest in Pascal

To calculate the amount of money a person can receive after depositing it in a bank at a certain annual interest rate for a specified number of years, you can use the following formula:

A = P(1 + r)^n

Where: - A = the amount of money accumulated after n years, including interest. - P = the principal amount (initial deposit). - r = the annual interest rate (in decimal). - n = the number of years the money is deposited for.

In Pascal, you can use the following code to calculate and display the amounts the person can receive after each year:

```pascal program InterestCalculator; var P, A: real; r: real; n, i: integer; begin { Input principal amount, annual interest rate, and number of years } write('Enter the principal amount: '); readln(P); write('Enter the annual interest rate (in decimal): '); readln(r); write('Enter the number of years: '); readln(n); { Calculate and display the amount after each year } for i := 1 to n do begin A := P * power(1 + r, i); writeln('Amount after year ', i, ': ', A:0:2); end; end. ```

This program prompts the user to input the principal amount, annual interest rate, and the number of years. It then calculates and displays the amount after each year using the formula A = P(1 + r)^n.

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

0 0

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

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

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