Given the first 2 terms A and B of an Arithmetic Series, tell the Nth term of the series.
The first line of input contains an integer, the number of test cases T. T testcases follow. Each testcase in its first line should contain two positive integer A and B(First 2 terms of AP). In the second line of every testcase it contains of an integer N.
For each testcase, in a new line, print the Nth term of the Arithmetic Progression.
1 <= T <= 100
-103 <= A <= 103
-103 <= B <= 103
1 <= N <= 104
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.