belial5730
春芽
共回答了25个问题采纳率:88% 举报
这题有确定的答案,用不着程序处理啊.
如果用程序处理的话,大人最多25个(一人吃4个,总共就100个),要满足100人的话,小孩最少75,所以
dim intL '大人个数
dim intS '小孩个数
for intS = 75 to 100
for intL = 0 to 25
if (intS + intL = 100) and (intS mod 4 = 0) and (4 * intL + intS / 4 = 100) then
msgbox "大人 = " & intL & " 小孩 = " & intS
end if
next
next
1年前
5