c (4n-3)(4n-2)
c Program to find the sum of the series ------------------ upto a no. of terms
c 4n(4n-1)
write(*,*)'Enter the no. of terms:'
read(*,*)n
sum=0
do i=1,n
term=(4.0*i-3.0)*(4.0*i-2.0)/((4.0*i-1.0)*4.0*i)
sum=sum+term
end do
write(*,10)sum
10 format(2x,'the sum of the series is:',f16.4)
end
c Program to find the sum of the series ------------------ upto a no. of terms
c 4n(4n-1)
write(*,*)'Enter the no. of terms:'
read(*,*)n
sum=0
do i=1,n
term=(4.0*i-3.0)*(4.0*i-2.0)/((4.0*i-1.0)*4.0*i)
sum=sum+term
end do
write(*,10)sum
10 format(2x,'the sum of the series is:',f16.4)
end
Comments
Post a Comment