program summing_a_series
implicit none 
real :: x,x2,x4,x6,x8,x10,sum 
print*, "enter the value of x"
read*, x 
x2 = x*x/2 
x4 = x2*x2/24
x6 = x4*x2/30
x8 = x6*x2/56
x10 = x8*x2/90
sum = 1-x2+x4-x6+x8-x10
print*, "sum", sum 
end program summing_a_series

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: