Given the first 2 terms A and B of a Geometric Series. The task is to find the Nth term of the series.
First line contains an integer, the number of test cases 'T'. T testcases follow. Each test case in its first line contains two integer A and B (First 2 terms of GP). In the second line of every test case it contains of an integer N.
In each seperate line print the Nth term of the Geometric Progression. Print the floor ( floor(2.3)=2 ) of the answer. Both the terms A and B forms a valid GP.
1 <= T <= 30
-100 <= A <= 100
-100 <= B <= 100
1 <= N <= 5
Testcase 2: The second term of series whose common ratio is 2 will be 2.
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.