Write a program to print sum of an Arithmetic Series with n terms with first term given as a and common difference d.
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 AP and second line its first term and common difference.
For each test case, output will be the sum of AP
1 <= T <= 100
1 <= N <= 1000
1 <= a,d <= 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.