Tuesday, July 26, 2016

TCS Mock Code vita-1(Season-5) program-2

Problem : The power of compounding
Manish has realized the power of compounding. Since the days he started earning, he has diligently set aside a small corpus which he saves from his monthly salary and deposits in his bank account. Bank pays him interest every month. Manish is also a determined investor and refrains from withdrawing anything from this account because he now believes in power of compounding. Given investment corpus, fixed annual rate of interest and maturity period calculate the amount the Manish will end up saving at the end of his tenure. 
Input Format: 

First line contains investment corpus
 P 
Second line contains rate of interest per annum
 R 
Third line contains tenure
 T (in months) 
Output Format: 

Print the maturity amount after specified tenure in the format "Final_Amount <Value>"
 
Constraints:
P > 0 ; it can be float value
R >=0 ; it can be float value
T >0 ; it can be integer only
Calculation should be done upto 11-digit precision
Maturity amount should be printed, rounded off to its nearest integer value



Sample Input and Output

SNo.
Input
Output
1

25
4
6

Final_Amount 152
2

52.50
3.6
5

Final_Amount 265
3

500
3.6
MARCH

Invalid Input