谁能帮小弟解答一道C语言题目
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/08/15 05:54:40
谁能帮小弟解答一道C语言题目
Write a program that asks the user to type in two integer values at the terminal.The first number is the amount the user if going to borrow and the second is the monthly amount he can afford to pay.The loan interest rate is set to 18% per year (or 1.5% per month).The monthly payment covers the interest first and whatever is left is used to pay the remaining debt.
Your program should return the time (in years and or months) it will take to pay the loan.If the payment does not cover the interest,it should indicate so.See examples below
$1000 and $40 repayment should return "it will take 2 years and 8 months to pay the loan"
$1000 and $10 repayment should return "the monthly payment does not cover the loan"
Write a program that asks the user to type in two integer values at the terminal.The first number is the amount the user if going to borrow and the second is the monthly amount he can afford to pay.The loan interest rate is set to 18% per year (or 1.5% per month).The monthly payment covers the interest first and whatever is left is used to pay the remaining debt.
Your program should return the time (in years and or months) it will take to pay the loan.If the payment does not cover the interest,it should indicate so.See examples below
$1000 and $40 repayment should return "it will take 2 years and 8 months to pay the loan"
$1000 and $10 repayment should return "the monthly payment does not cover the loan"
![谁能帮小弟解答一道C语言题目](/uploads/image/z/5826160-64-0.jpg?t=%E8%B0%81%E8%83%BD%E5%B8%AE%E5%B0%8F%E5%BC%9F%E8%A7%A3%E7%AD%94%E4%B8%80%E9%81%93C%E8%AF%AD%E8%A8%80%E9%A2%98%E7%9B%AE)
英语学的不好,把题目翻译成中文