国王棋盘小麦问题vb语言“国王有一棋难局,请所有臣民解决.一臣民解决了难局,国王问其要何奖励,该臣民请国王奖给米粒,米粒

1个回答

  • Private Sub Command1_Click()

    Dim s As Double

    Dim i As Integer

    s = 0

    For i = 0 To 63

    s = s + 2 ^ i

    Next

    Text1.Text = s

    End Sub

    结果:1.84467440737096E+19

相关问题