Write a program to find the compund interest for given principal amount P , time T(in years), compounds N times in a year at rate R. Calculate floor of future value of given principal amount.

**Input:**

First line contains an integer, the number of test cases 'T'. Each test case should contain three values P, T, N, R.

**Output:**

Print the future value for given principal after calculating Compund Interest.

Note: Print only floor of the future value. For example, if future value is 134.891, then output should be 134.

**Constraints:**

1<=T<=100

1<=P<=1000

1<=T<=20

1<=N<=4

1<=R<=20

**Example:**

Input:

1

1000

2

2

10

Output:

1215 //instead of 1215.51

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

thanuvinu94 | 425 |

the_coder95 | 380 |

RishabhTanwar1 | 280 |

shubham3174 | 208 |

RitikRosan | 202 |

the_coder95 | 1226 |

RishabhTanwar1 | 1000 |

thanuvinu94 | 634 |

tathagat289 | 628 |

themanhasnoname | 620 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4885 |

Quandray | 4547 |

Login to report an issue on this page.