program sumsin real sum, theta, tot integer i,n sum=0 print '(a,$)',' Theta = ' read(5,*) theta print '(a,$)',' N = ' read(5,*)n do i=0,n sum = sum + sin(i*theta) end do tot = 0.5*cos(theta/2)/sin(theta/2) print '(a,e12.4)',' theta = ', theta print '(a,e12.4,a,e12.4)',' Sum = ', sum,' total = ',tot end