Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a program to generate the first N terms of the arithmetic series.

Medium

Problem Statement

Create a program to generate the first N terms of the arithmetic series.

Sample Input

int a = 5, d = 3, N = 10;

Sample Output

Arithmetic series: 5 8 11 14 17 20 23 26 29 32 

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <iostream> int main() { int a = 5, d = 3, N = 10; // Logic to generate the arithmetic series return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
int a = 5, d = 3, N = 10;
Expected Output
Arithmetic series: 5 8 11 14 17 20 23 26 29 32