Design a function void printInfo (String name, long acn, double principal, double rate, int time) – the function accepts name of account holder (name), account number (acn), principal amount (principal), rate of interest (rate) and time period (time). Calculate and print all the details of account holder including simple interest (SI) using:
SI = (principal*rate*time)/100;
Write a function void outputPrint() to input name, account number, principal amount, rate of interest and time period. By invoking function printInfo() calculate simple interest and print all the data members.
Example:
Input name : Mr. Nandalal Basu
Input account number : 110001
Input Principal amount (Rs): 15000.0
Input interest rate : 7.25
Input time period : 4
OUTPUT:
Account holder’s Name : Mr. Nandalal Basu
Account number : 110001
Principal amount (Rs) : 15000.0
Rate of interest : 7.25
Time period : 4
Simple Interest (Rs) : 4350.0
Answers
Answered by
3
hope you found it useful
OUTPUT
Attachments:
Similar questions