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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:30, rodfam13716
If you turn on the lock alpha button , what happens
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, zay179
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
image
Computers and Technology, 23.06.2019 00:00, dubouuu
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
image
Computers and Technology, 23.06.2019 11:30, kyraj21
Which excel file extension stores automated steps for repetitive tasks?
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 in other subjects: