Write a program to calculate the sum of the first n terms of an arithmetic progression (AP), given its first term 'a', common difference 'd', and number of terms 'n'.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.