Computer Science, asked by kanugulanavya1527, 5 months ago

Given the values of first term (a), and the common difference (d), generate first n terms in an Arithmetic Progression (AP). Design a modularized code for the specified task. (Hint: The first n terms in AP are a, a+d, a+2d, a+3d, .. a+(n-1)d)

Answers

Answered by pragatibhatt2922
1

Answer:

#love...

Explanation:

Arithmetic progression is the sequence of numbers such that the difference between the consecutive numbers is constant.

If the first term is a and the common difference is d then the sequence is a,a+d,a+2d,a+3d,...

Given that first term a=4 and

common difference d=−3

Therefore, the sequence is 4,4+(−3),4+2(−3),4+3(−3),...

⟹4,1,−2,−5,... is the required arithmetic progression.

Answered by DevilHunter001
0

Answer:

Answer:

#love...

Explanation:

Arithmetic progression is the sequence of numbers such that the difference between the consecutive numbers is constant.

If the first term is a and the common difference is d then the sequence is a,a+d,a+2d,a+3d,...

Given that first term a=4 and

common difference d=−3

Therefore, the sequence is 4,4+(−3),4+2(−3),4+3(−3),...

⟹4,1,−2,−5,... is the required arithmetic progression.

Similar questions