So i was looking at hybrids tutorials to learn C# and i came across this assignment he wanted us to do and i wasnt going to skip it just because no one will know i skipped it, and i didnt want to cheat myself, so he gave me this "Problem" and i had to answer it in C#. i think i did it right, but im really not sure. so can someone take a look at it for me? if you dont know how to code, dont post in this thread, im looking for some real help and not some smartass answers, so thanks in advance to whoever helps me.
Problem:
Angelica has a bank account. Each month, she gains an interest of 0.03%. There withdrawal fee of $1.00 (every time money is withdrawn from the account $1.00 is also subtracted). Today, Angelica withdraws $20, but what will her balance be next month? Angelica will input her balance into your program.
From the problem it seems like there's only one months worth of interest. Just a reading difference (I could be wrong). And technically if its 0.03% then it's actually 1.00003 x the balance. Another reading difference. And the way order of operations works you need to take out the parenthesis in balance - (20 - 1), because that's actually balance - 19 (it subtracts 1 from 20 first, leaving 19), when you really want balance - 21.
From the problem it seems like there's only one months worth of interest. Just a reading difference (I could be wrong). And technically if its 0.03% then it's actually 1.00003 x the balance. Another reading difference. And the way order of operations works you need to take out the parenthesis in balance - (20 - 1), because that's actually balance - 19 (it subtracts 1 from 20 first, leaving 19), when you really want balance - 21.
i have no clue *****, im trying to teach myselff, its extremely hard specially at my age, and your right if those calculations were true, but an error you just point at to me is "balance = balance - (20 +- 1)" because your withdrawing 20 bucks but the bank is then taking 1 dollar out of your bank account, the way i had it written was what you said, you would be withdrawing 19 bucks, and i dont know what to tell ya about the months thing, im on Lession number 8 and im barely getting the hang of each lesson, but w/e hopefully ill run into someone who wants to help xD.
The way you had it written you were removing $19 from the account. You should be removing $21 from the account, nevermind if its being withdrawn or otherwise. Do it in 2 separate modifications to the balance if your struggling to understand this:
Say you have $100 and you withdraw $20, 100 - 20 = 80. Then the bank charges you $1 for the withdrawal 80 - 1 = 79. 100 - 79 = 21.
The amount you withdraw doesn't just decrease by $1, that's not how banks operate.
From the problem it seems like there's only one months worth of interest. Just a reading difference (I could be wrong). And technically if its 0.03% then it's actually 1.00003 x the balance. Another reading difference. And the way order of operations works you need to take out the parenthesis in balance - (20 - 1), because that's actually balance - 19 (it subtracts 1 from 20 first, leaving 19), when you really want balance - 21.
Quote:
Originally Posted by Korvacs
The way you had it written you were removing $19 from the account. You should be removing $21 from the account, nevermind if its being withdrawn or otherwise. Do it in 2 separate modifications to the balance if your struggling to understand this:
Say you have $100 and you withdraw $20, 100 - 20 = 80. Then the bank charges you $1 for the withdrawal 80 - 1 = 79. 100 - 79 = 21.
The amount you withdraw doesn't just decrease by $1, that's not how banks operate.
i know, i didnt mean to put (20 - 1) that lost post should have said that if im not mistaken? but thanks bro.
[Guide] - Coding a GW Bot 05/08/2022 - GW Guides & Templates - 98 Replies Coding a GW Bot
featuring the tt6
In diesem Guide werde ich euch mein Wissen in Thema Bot-Coding vermitteln. Vom GUI bis zum vollendeten Bot, werde ich alles detailliert beschreiben. Das ganze wird an einem Beispiel-Bot erklärt, dem Sanctum Cay Bot.
Inhaltsverzeichnis
1. Programme
2. Vorbereitung