当前位置:百问九>百科知识>VB考试题

VB考试题

2023-11-04 17:13:50 编辑:zane 浏览量:589

VB考试题

第一题:楼配简上没考虑硬币总数是10枚哦Private Sub Form_Click()Dim i%, j%, k%, n%n = 0For i = 0 To 10For j = 0 To 10 - iFor k = 0 To 10 - i - jIf 1 * i + 2 * j + 5 * k = 25 And i + j + k = 10 ThenPrint "1元" & i & "枚", "2元" & j & "枚", "5元" & k & "枚"n = n + 1End IfNext kNext jNext iPrint "一共有" & n & "种不同的取法"End Sub第二题:Private Sub Form_Click()Dim i%For i = 1 To 40If i * 3 + (100 - i) / 3 = 100 ThenPrint "母鸡数量:" & iPrint "小培蚂裤物敬鸡数量:" & (100 - i)End IfNext iEnd Sub

版权声明:文章由 百问九 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.baiwen9.com/article/314270.html
热门文章
二维码