C Program to find sum of n^2 series
write(*,*)'Enter the no. of terms:'
read(*,*)n
sum=0.0
do i=1,n
term=i**2
sum=sum+term
end do
write(*,*)'The sum of the given series is:',sum
end
write(*,*)'Enter the no. of terms:'
read(*,*)n
sum=0.0
do i=1,n
term=i**2
sum=sum+term
end do
write(*,*)'The sum of the given series is:',sum
end
Comments
Post a Comment