vb编程题目小明要去工作,有甲和乙公司,月薪都为1000元,甲公司每月都会加100元,乙公司每月都回加8%,小明打算工作

1个回答

  • Private Sub Command1_Click()

    Dim Jia As Single, Yi As Single, N As Integer

    Do

    N = N + 1

    Jia = Jia + 1000 + 100 * (N - 1)

    Yi = Yi + 1000 * (1.08) ^ (N - 1)

    Loop Until N = 24

    MsgBox "两年时间甲的总收入:" & Jia & ",乙的总收入:" & Yi

    End Su

相关问题