----------------------------------------------------------------------------------------
方法一:
Private Sub Command1_Click() Dim sum As Double Dim i As Integer Dim n As Integer sum = 0 n = 100 For i = 1 To n Step 1 sum = sum + (-1) ^ (i + 1) / i Next i Text1.Text = Str(sum) End Sub
----------------------------------------------------------------------------------------
方法二:
Private Sub Command2_Click() Dim sum As Double Dim i As Integer Dim n As Integer sum = 0 i = 1 n = 100 Do While i <= n sum = sum + (-1) ^ (i + 1) / i i = i + 1 Loop1 Text2.Text = Str(sum) End Sub
----------------------------------------------------------------------------------------
退出:
Private Sub Command3_Click() End End Sub ----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
Private Sub Command1_Click() Dim sum As Double Dim a, b As Integer Dim i, n As Integer i = 1: n = 20 a = 1: b = 2: sum = 0 For i = 1 To n Step 1 sum = sum + b / a Dim temp As Integer temp = a a = b b = b + temp Next i Text1.Text = Str(sum) End Sub ----------------------------------------------------------------------------------------
退出:
Private Sub Command2_Click() End End Sub
乌云数据主营高性价比国内外云服务器,物理机,本着机器为主服务为辅的运营理念,将客户的体验放在第一位,提供性价比最高的云服务器,帮助各位站长上云,同时我们深知新人站长的不易,特此提供永久免费虚拟主机,已提供两年之久,帮助了上万名站长从零上云官网:https://wuvps.cn迎国庆豪礼一多款机型史上最低价,续费不加价 尽在wuvps.cn香港cera机房,香港沙田机房,超低延迟CN2线路地区CPU...
atcloud怎么样?atcloud刚刚发布了最新的8折优惠码,该商家主要提供常规cloud(VPS)和storage(大硬盘存储)系列VPS,其数据中心分布在美国(俄勒冈、弗吉尼亚)、加拿大、英国、法国、德国、新加坡,所有VPS默认提供480Gbps的超高DDoS防御。Atcloud高防VPS。atcloud.net,2020年成立,主要提供基于KVM虚拟架构的VPS、只能DNS解析、域名、SS...
官方网站:https://www.akkocloud.com/AkkoCloud新品英国伦敦CN2 GIA已上线三网回程CN2 GIA 国内速度优秀.电信去程CN2 GIALooking Glass:http://lonlg.akkocloud.com/Speedtest:http://lonlg.akkocloud.com/speedtest/新品上线刚好碰上国庆节 特此放上国庆专属九折循环优惠...