# Calculating deposit amounts

Page 1 of 1

## 4 Replies - 306 Views - Last Post: 05 November 2017 - 03:18 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=407405&amp;s=950adb03ba56f3d39e5949d79f667272&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

• New D.I.C Head

Reputation: 0
• Posts: 4
• Joined: 04-November 17

# Calculating deposit amounts

Posted 05 November 2017 - 09:09 AM

So my homework requires me to write a program that will read a loan amount and calculate a deposit amount. I don't necessarily need someone to give me the code, but i just need like an outline of how something of this nature would go. It gives multiple loan/deposit amounts like "if the loan is less than 10000, the deposit is 10% of the loan" and so on. How do I calculate percentage? Should I use an if...else statement? I am very lost.
Is This A Good Question/Topic? 0

## Replies To: Calculating deposit amounts

### #2 snoopy11

• Engineering ● Software

Reputation: 1438
• Posts: 4,629
• Joined: 20-March 10

## Re: Calculating deposit amounts

Posted 05 November 2017 - 09:22 AM

Well,

10% is 10/100 = 0.1

so 10% of \$25,000 = 25,00 x 0.1 = \$2,500

So code outline eh?

Well ask for the amount to be loaned.
Get that input.

calculate the amount of deposit required from that input.

You will need to use if statements probably..

without seeing the full instructions its hard to help further.

• New D.I.C Head

Reputation: 0
• Posts: 4
• Joined: 04-November 17

## Re: Calculating deposit amounts

Posted 05 November 2017 - 10:49 AM

****excessive quote removed*****

An authority requires a deposit on a car loan according to the following schedule:
Loan\$ Deposit
Less than \$10000 10% of loan value
Less than \$15000 \$200 + 6% of loan value
Less than \$20000 \$500 + 5% of loan value
Less than \$50000 \$1000 + 3% of loan value
Loans in excess of \$50000 are not allowed.
Write a program that will read a loan amount and compute and print the required deposit.

This post has been edited by snoopy11: 05 November 2017 - 11:33 AM
Reason for edit:: large quote from me snoopy11 removed

### #4 snoopy11

• Engineering ● Software

Reputation: 1438
• Posts: 4,629
• Joined: 20-March 10

## Re: Calculating deposit amounts

Posted 05 November 2017 - 11:34 AM

Ok stop quoting people just use the fast reply area at the bottom...

and it seems simple enough.... so do you have specific questions.... about your project ?

### #5 r.stiltskin

• D.I.C Lover

Reputation: 2030
• Posts: 5,430
• Joined: 27-December 05

## Re: Calculating deposit amounts

Posted 05 November 2017 - 03:18 PM

jadecatunao, on 05 November 2017 - 12:09 PM, said:

Should I use an if...else statement?

Yes.