Question bank › Math
Dsa Math Medium

Arithmetic Series Sum

Write a program that calculates the sum of the first n terms of an arithmetic series defined by a starting term and a difference. The sum can be computed using the formula: S_n = n/2 * (2a + (n-1)d), where a is the first term, d is the difference, and n is the number of terms. Input: Three integers a, d, n on a single line, separated by spaces. Output: The sum of the first n terms of the series. Example: Input: 1 2 5 Output: 25

Key concepts

seriessummationarithmetic

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.