能帮我解一下这道程序框数学题的解题思路。绝对会采纳。最好写给我谢谢!
1个回答
展开全部
1、s=0,n=1,因为n小于等于2014,执行s=s+sin(nπ/3)=sin(π/3),n=1+1=2
2、s=sin(π/3),n=2,因为n小于等于2014,执行s=s+sin(nπ/3)=sin(π/3)+sin(2π/3),n=2+1=3
3、同理当n=6时,经历了π/3,2π/3,3π/3,4π/3,5π/3,6π/3,为一个周期s=sin(π/3)+sin(2π/3)+sin(3π/3)+sin(4π/3)+sin(5π/3)+sin(6π/3)=0
4、直到n=2014,2014/6=671余1,即sin(π/3),所以,n=1~2013的s的和为0,s=0+sin(π/3)=(根号3)/2
5、当n=2015,不满足条件,不再加了,而是输出s=(根号3)/2
2、s=sin(π/3),n=2,因为n小于等于2014,执行s=s+sin(nπ/3)=sin(π/3)+sin(2π/3),n=2+1=3
3、同理当n=6时,经历了π/3,2π/3,3π/3,4π/3,5π/3,6π/3,为一个周期s=sin(π/3)+sin(2π/3)+sin(3π/3)+sin(4π/3)+sin(5π/3)+sin(6π/3)=0
4、直到n=2014,2014/6=671余1,即sin(π/3),所以,n=1~2013的s的和为0,s=0+sin(π/3)=(根号3)/2
5、当n=2015,不满足条件,不再加了,而是输出s=(根号3)/2
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询