Write a Program to calculate the sum of n terms of a Geometric Progression when first term is a and common ratio is r.
The first line of the input contains T denoting the number of testcases. The first line of the test case will be the number of terms of GP and second line contains first term and common ratio.
For each test case the output will be the sum of n terms of GP.Print the answer upto 6 decimal places.
1 <= T<= 100
1 <= N <= 100
1 <= a,r <= 100
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.