subject

Your program will prompt the user to enter a value for the amount of expenses on the credit card. retrieve the user input using fgets()/sscanf() and save the input value in a variable. the value should be read as type double. the user may or may not enter cents as part of the input. in other words, expect the user to enter values such as 500, 500.00 and 500.10. the program will then prompt the user to enter the annual percentage rate (apr) for the credit card. this value should also be read as type double and saved in a second variable. next, your program will prompt the user to enter the number of days money is borrowed. this value should be read as type int. after the values have been entered, your program will calculate the amount of the interest and save the result in a fourth variable. the program will then add the interest amount to the expense amount and save this result in a fifth variable. finally, it will print all five variables (expense amount, apr, number of days, amount of interest and total amount to be paid back) to the screen in an informative format. ensure that the floating point output always displays exactly two decimal places. also, values of a magnitude less than 1 should display a leading 0 (ex. 0.75).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
question
Computers and Technology, 23.06.2019 01:50
Free points just awnser this. what should i watch on netflix
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
question
Computers and Technology, 25.06.2019 02:00
Software and services are used to conceive, plan, and execute projects in any field. these tools are excellent methods of increasing the probability of successful projects. open source linux project management mind-mapping
Answers: 2
You know the right answer?
Your program will prompt the user to enter a value for the amount of expenses on the credit card. re...
Questions
question
Biology, 04.02.2021 22:20
question
Mathematics, 04.02.2021 22:20
question
Biology, 04.02.2021 22:20
question
Law, 04.02.2021 22:20
question
Mathematics, 04.02.2021 22:20
question
Biology, 04.02.2021 22:20
Questions on the website: 13722360