practice6_13.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 57 行
FRM
57 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3600
ClientLeft = 60
ClientTop = 345
ClientWidth = 7920
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 3600
ScaleWidth = 7920
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "打印所有100-1000之间的水仙花数"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 1560
TabIndex = 0
Top = 2400
Width = 5175
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()
Dim a As Integer, b As Integer, c As Integer
Dim s1 As Integer, s2 As Integer
For a = 1 To 9
For b = 0 To 9
For c = 0 To 9
s1 = 100 * a + 10 * b + c
s2 = a ^ 3 + b ^ 3 + c ^ 3
If s1 = s2 Then
Print s1;
End If
Next c, b, a
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?