x=int(input("Enter the value of x "))
num=int(input("Enter the value of n "))
s=0
for i in range(1,num+1):
term= x/i**2 #for each term
s+=term
print(s)
Comments
Post a Comment