⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 装箱方案改进1.frm

📁 算法教案
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "变形金刚箱方案"
   ClientHeight    =   3960
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5940
   LinkTopic       =   "Form1"
   ScaleHeight     =   3960
   ScaleWidth      =   5940
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "计算"
      Height          =   375
      Left            =   3720
      TabIndex        =   3
      Top             =   3000
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   3720
      Locked          =   -1  'True
      TabIndex        =   2
      Top             =   2280
      Width           =   1095
   End
   Begin VB.ListBox List1 
      Height          =   2940
      ItemData        =   "装箱方案改进1.frx":0000
      Left            =   240
      List            =   "装箱方案改进1.frx":0002
      TabIndex        =   0
      Top             =   360
      Width           =   3135
   End
   Begin VB.Label Label2 
      Caption         =   "方案数"
      Height          =   255
      Left            =   3720
      TabIndex        =   1
      Top             =   1680
      Width           =   1095
   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 x, y, z, c  As Integer
    c = 0
    List1.Clear
    For x = 1 To 293
        For y = 1 To (592 - 2 * x) \ 5
            z = 600 - 2 * x - 5 * y        '计算剩余变形金刚数量
            If z Mod 8 = 0 And z > 0 Then  '判断Z是否为8的倍数且大于0
                    z = z \ 8
                    List1.AddItem Str(x) + " " + Str(y) + " " + Str(z)
                    c = c + 1
                End If
        Next y
    Next x
    Text2.Text = Str(c)
End Sub

Private Sub Form_Load()

End Sub

⌨️ 快捷键说明

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