Asked by ahmad
                write a program thatprint on secreen the reselt of the following series:
d=1+2/x^2+3/x^3+.....r/x^r .
thanks
            
            
        d=1+2/x^2+3/x^3+.....r/x^r .
thanks
Answers
                    Answered by
            Steve
            
    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.
    
$sum = 1;
$sum += $n/$x**$n foreach $n (2..$r);
print $sum;
I leave it to you to provide values for x and r.
                                                    There are no AI answers yet. The ability to request AI answers is coming soon!
                                            
                Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.