4 Replies - 260 Views - Last Post: 05 November 2017 - 03:18 PM Rate Topic: -----

#1 jadecatunao  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • 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  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1376
  • View blog
  • Posts: 4,309
  • 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.
Was This Post Helpful? 0
  • +
  • -

#3 jadecatunao  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • 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

Was This Post Helpful? 0
  • +
  • -

#4 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1376
  • View blog
  • Posts: 4,309
  • 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 ?
Was This Post Helpful? 0
  • +
  • -

#5 r.stiltskin  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2009
  • View blog
  • Posts: 5,387
  • Joined: 27-December 05

Re: Calculating deposit amounts

Posted 05 November 2017 - 03:18 PM

View Postjadecatunao, on 05 November 2017 - 12:09 PM, said:

Should I use an if...else statement?

Yes.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1