Private Sub Form_Load()
Show
Dim x As Single, y As Single, n As Single
x = InputBox("请输入人均食品支出总额:", "输入")
y = InputBox("请输入人均个人消费支出总额:", "输入")
n = x / y
Print "恩格尔系数你="; n
Select Case CInt(n * 100)
Case Is > 59
Print " 该地区居民生活处于贫困水平"
Case 50 To 59
Print "该地区居民生活处于温饱水平"
Case 40 To 49
Print "该地区居民生活处于小康水平"
Case 30 To 39
Print "该地区居民生活处于富裕水平"
Case Else
Print "该地区居民生活处于最富裕水平"
End Select
End Sub
Show
Dim x As Single, y As Single, n As Single
x = InputBox("请输入人均食品支出总额:", "输入")
y = InputBox("请输入人均个人消费支出总额:", "输入")
n = x / y
Print "恩格尔系数你="; n
Select Case CInt(n * 100)
Case Is > 59
Print " 该地区居民生活处于贫困水平"
Case 50 To 59
Print "该地区居民生活处于温饱水平"
Case 40 To 49
Print "该地区居民生活处于小康水平"
Case 30 To 39
Print "该地区居民生活处于富裕水平"
Case Else
Print "该地区居民生活处于最富裕水平"
End Select
End Sub