write a program thatprint on secreen the reselt of the following series:

d=1+2/x^2+3/x^3+.....r/x^r .
thanks

1 answer

in perl,

$sum = 1;
$sum += $n/$x**$n foreach $n (2..$r);
print $sum;

I leave it to you to provide values for x and r.
Similar Questions
    1. answers icon 1 answer
  1. 1. Elements – sequence-series outputtingWrite a program that prints the following elements: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19,
    1. answers icon 0 answers
  2. Elements – sequence-series outputtingWrite a program that prints the following elements: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19,
    1. answers icon 2 answers
    1. answers icon 1 answer
more similar questions