Computer Science, asked by rorylyle27642, 10 months ago

write a program to generate the below series using a sub procedure 5 10 15 25 40 65 105 up to 10 terms​

Answers

Answered by chiefprashant
3

It's kinda like Fibonacci series.

#Python

def ser(n):

if n<2 :

return 5

return ser(n-1) + ser(n-2)

Answered by AskewTronics
0

Below are the program for the above question:

Explanation:

series=5 #intialize the value for starting series.

for x in range(10): #for loop

   print(series,end=" ") #print the series with the space.

   series=series+5 #increment operation for the series.

Output:

  • The above program gives the output as "5 10 15 20 25 30 35 40 45 50 ".

Code Explanation:

  • The above code is in python language.
  • There is a series variable which increase the value by 5 because there are 5 difference between in the series.

Learn More:

  • Python : https://brainly.in/question/14689905
Similar questions