title: applying function or loop function
body: <p>1.Let CFt denote cash flows at time t. Then, the present value is
  PV=∑t( CFt/(1+i)t).</p>
  <p>Consider the following cash flows: 100, 400, 1000, 3000, 100, 500.</p>
  <p>Assume i=0.05 and compute PV
  2. Implement a function that accepts a vector of cashflows and a parameter for i. The functions returns the PV
  how to solve these problem can anyone tell me</p>