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, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
What is the total number of time zones that can be configured to show by default in a calendar in outlook 2016?
Answers: 1
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
Mathematics, 18.10.2020 15:01
question
Biology, 18.10.2020 15:01
Questions on the website: 13722360