Question: This question is by using C++ program: Task 3 (requires some thinking): Write a function that takes in a positive integer number smaller than 999999.

This question is by using C++ program:This question is by using C++ program: Task 3 (requires some thinking):

Task 3 (requires some thinking): Write a function that takes in a positive integer number smaller than 999999. It is supposed to be your student no, i.e., UNIMKL-000782 for example. Yes, you need to return the student number as a string or char array that corresponds to the input integer. The tough part is that no matter what number it is, the returned string must always be 6 digits. So if the input is 7850, the returned string is UNIMKL-007850, but if the input is 10150, the returned string is UNIMKL-010150, not UNIMKL-0010150 (7 digits). To prove verify that your function is correct, write a loop that loops from 1 to 100, and display the returned string on the windows console. Task 4a: Write a program with a main) function. Inside main0, simply ask user to enter the amount of money that he/she is depositing in the bank (e.g. 8000). Next, ask user to enter a positive integer, indicating the number of years that a bank customer has deposited his/her money (e.g. 5). Then ask for another number (must admit decimal points), indicating the interest rate per annum as a percentage (e.g. 3.2). Write a function that takes these three input parameters and returns the total money that has accumulated interests over the number of years as indicated by the input argument. You may call the function add_interest_to_capital. Hard (requires some thinking): Task 4b: Write a function which takes in a double type variable and outputs the number as a string and the number has exactly two decimal points. You may use this function in displaying the returned money in add_interest_to_capital so that it is displayed as a two-decimal value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!