Help on a question

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 complete program that will read a loan amount and compute and print the required deposit. C++ language only. No points will be given if other languages are used.
Last edited on
Show us what you've tried so far. Is there a particular part you're having trouble with?
Last edited on
That's the thing Idk how to really. I've been confused about how to code because my teacher isn't good at teaching it.
I would suggest looking at a tutorial. There are plenty online, but here is this site's one:
https://cplusplus.com/doc/tutorial/

Break the problem down into just its most basic components.
First,
write a program that will read a loan amount
.
Just focus on this. They're saying, have the user enter a loan amount.

To get input from the user, see: https://cplusplus.com/doc/tutorial/basic_io/ (see cin).

Next, you'll need if statements, one for each case you have.
https://cplusplus.com/doc/tutorial/control/ (see the if statement section).

Less than $10000 10% of loan value

This is saying:
1
2
3
4
if (the loan amount is less than 10000)
{
    the deposit required is 0.10 * (loan amount)
}
Last edited on
Ok, I'll do my research, and then I'll come back and try to give what coding I get.
Also have a look at https://www.learncpp.com/
Topic archived. No new replies allowed.