Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events: change, input, cut, copy, paste #290

Merged
merged 7 commits into from
Aug 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
task.md done
  • Loading branch information
shahrzadJavadiKoushesh committed Aug 21, 2023
commit 11f9248c5287b660db69c636ad2ae48613e380e0
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ importance: 5

# Deposit calculator

Create an interface that allows to enter a sum of bank deposit and percentage, then calculates how much it will be after given periods of time.
یک interface ایجاد کنید که اجازه می‌دهد مجموع سپرده بانکی و درصد را وارد کنید، سپس محاسبه می‌کند که پس از دوره‌های زمانی مشخص چقدر خواهد بود.

Here's the demo:
اینجا نسخه‌ی نمایشی هست:

[iframe src="solution" height="350" border="1"]

Any input change should be processed immediately.
هر تغییری در input باید بلافاصله پردازش شود.

The formula is:
فرمول این است:
```js
// initial: the initial money sum
// interest: e.g. 0.05 means 5% per year
// years: how many years to wait
// initial: مبلغ اولیه پول
// interest: مثلا 0.05 یعنی 5% در هر سال
// years: تعداد سال برای صبر کردن
let result = Math.round(initial * (1 + interest) ** years);
```