已知输入一个等差数列的首项a1,第n项an,以及n的值,编写程序输出公差d及其前n项和Sn
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 15:53:06
已知输入一个等差数列的首项a1,第n项an,以及n的值,编写程序输出公差d及其前n项和Sn
用c++编写程序
用c++编写程序
vb的话
private sub command1_click()
dim a1 as single,an as single,n as single,d as single,Sn as single
a1=text1.text
an=text2.text
n=text3.text
d=(an-a1)/n+1
Sn=(a1+an)*d/2
print "d=";d
print "Sn=";Sn
end su
private sub command1_click()
dim a1 as single,an as single,n as single,d as single,Sn as single
a1=text1.text
an=text2.text
n=text3.text
d=(an-a1)/n+1
Sn=(a1+an)*d/2
print "d=";d
print "Sn=";Sn
end su
等差数列{an}的首项a1及公差d都是整数,前n项和Sn
已知等差数列an的首项a1>0,公差d>0,前n项和为Sn
已知等差数列{an}的公差d不为零,首项a1=2且前n项和为sn
已知等差数列an中a1=2,其前n项和sn,若数列{Sn/n}构成一个公差为2的等差数列,则a3=?
若等差数列{an}的首项为a1,公差为d,前n项的和为Sn,则数列(Sn/n)为等差数列,且通项
已知等差数列{an}的首项a1=1,公差d=1,前n项和为Sn,bn=1/Sn 求证:b1+b2+.+bn
已知等差数列{an}的首项a1=1,公差d=1,前n项和为Sn,bn=1Sn,
已知公差不为0的等差数列{An}的首项A1=1,前n项和为Sn,若数列{Sn/An}是等差数列,求An?
设Sn为等差数列{an}的前n项和,若a1=1,公差d=2,Sn+2-Sn=36,则n=( )
已知等差数列{an}的首项a1=a,公差d=2,前n项和为Sn,且S1,S2,S4成等比数列
设公差为d的等差数列{an}的前n项和为Sn,若a1=1,-2/17
等差数列{an}的前n项和为Sn,且S3=6,a1=4,则公差d等于