当前位置:编程学习 > VB >>

急救

随机取 90-100 10个整数
去最高最低 取平均的直
本人新手教下谢谢 --------------------编程问答-------------------- 随机值能不能重复?

--------------------编程问答-------------------- 晕死,看错了,应该可以,不然结果全一样了 --------------------编程问答--------------------   
  Dim maxValue As Long, minValue As Long
    Dim nValue As Single
    Dim i As Long, r As Long
    
    maxValue = 90
    minValue = 100
   
    Randomize
    For i = 1 To 10
        r = Int(Rnd * 11 + 90)
        If r > maxValue Then maxValue = r
        If r < minValue Then minValue = r
        nValue = nValue + r
        Debug.Print r;
    Next
    nValue = (nValue - maxValue - minValue) / 8
    Debug.Print nValue --------------------编程问答-------------------- 不明LZ在说什么 --------------------编程问答-------------------- 接分是王道! --------------------编程问答-------------------- 这个简单啊,网上搜一下就得到答案了.
补充:VB ,  网络编程
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,