Question: 1. Let . Write an R program to calculate h(x,n) using a for loop. 2. Turn this program into a function that takes two arguments,
1. Let
.
Write an R program to calculate h(x,n) using a for loop.
2. Turn this program into a function that takes two arguments, x and n, and returns h(x,n).
Make sure you deal with the case x=1.
h(ar, n) = 1 + T + at2 +.... + T = ."" ito
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
