d6.frm

来自「VB编写」· FRM 代码 · 共 43 行

FRM
43
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3795
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6045
   LinkTopic       =   "Form1"
   ScaleHeight     =   3795
   ScaleWidth      =   6045
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "显示所有水仙花数"
      Height          =   615
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1695
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Print ""
Print "                        ";
For a1 = 1 To 9
  For a2 = 0 To 9
    For a3 = 0 To 9
       s1 = a1 * a1 * a1 + a2 * a2 * a2 + a3 * a3 * a3
       s2 = a1 * 100 + a2 * 10 + a3
       If s2 = s1 Then
       Print s2;
       End If
    Next a3
  Next a2
Next a1

End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?