| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3544 人关注过本帖
标题:求各位老师做一个有关排序的vb程序,谢谢!
只看楼主 加入收藏
ysr2857
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:34
帖 子:809
专家分:77
注 册:2020-2-10
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:16 
求各位老师做一个有关排序的vb程序,谢谢!
请把下面204个偶数两两相加的和,相同的归一,不同的从小到大排序:
/6/12/18/30/42/60/72/102/108/138/150/180/192/198/228/240/270/282/312/348/420/432/462/522/570/600/618/642/660/810/822/828/858/882/1020/1032/1050/1062/1092/1152/1230/1278/1290/1302/1320/1428/1452/1482/1488/1608/1620/1668/1698/1722/1788/1872/1878/1932/1950/1998/2028/2082/2088/2112/2130/2142/2238/2268/2310/2340/2382/2550/2592/2658/2688/2712/2730/2790/2802/2970/3000/3120/3168/3252/3258/3300/3330/3360/3372/3390/3462/3468/3528/3540/3558/3582/3672/3768/3822/3852/3918/3930/4002/4020/4050/4092/4128/4158/4218/4230/4242/4260/4272/4338/4422/4482/4518/4548/4638/4650/4722/4788/4800/4932/4968/5010/5022/5100/5232/5280/5418/5442/5478/5502/5520/5640/5652/5658/5742/5850/5868/5880/6090/6132/6198/6270/6300/6360/6450/6552/6570/6660/6690/6702/6762/6780/6792/6828/6870/6948/6960/7128/7212/7308/7332/7350/7458/7488/7548/7560/7590/7758/7878/7950/8010/8088/8220/8232/8292/8388/8430/8538/8598/8628/8820/8838/8862/8970/9000/9012/9042/9240/9282/9342/9420/9432/9438/9462/9630/9678/9720/9768/9858/9930
搜索更多相关主题的帖子: 不同 从小到大 vb 老师 排序 
2020-04-10 14:45
ZHRXJR
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:125
帖 子:1034
专家分:5519
注 册:2016-5-10
收藏
得分:0 
问题好像不是太复杂,但你的叙述不清楚,两两相加是什么意思,例如
6、12、18、30、42、60、72、102...........
1、是6+12、6+18、6+30、6+42、6+60、6+72、6+102........12+18、12+30、12+42、12+60、12+72、13+102......18+30、18+42、18+60、18+72、18+102......30+42、30+60、30+72、30+102......等等,
   所有数据都两两相加
2、还是6+12、12+18、18+30、30+42、42+60、60+72、72+102.........
   相邻的二个数据相加

[此贴子已经被作者于2020-4-10 19:18编辑过]


请不要选我!!!
2020-04-10 19:17
ysr2857
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:34
帖 子:809
专家分:77
注 册:2020-2-10
收藏
得分:0 
回复 2楼 ZHRXJR
两两相加是任意两个都相加(是没有说清楚,包括自身相加如6+6),然后再把相同的归一,再从小到大排列,谢谢您!
2020-04-10 23:50
ysr2857
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:34
帖 子:809
专家分:77
注 册:2020-2-10
收藏
得分:0 
是6+6,6+12、6+18、6+30、6+42、6+60、6+72、6+102........12+12,12+18、12+30、12+42、12+60、12+72、12+102......18+18,18+30、18+42、18+60、18+72、18+102......30+30,30+42、30+60、30+72、30+102......等等,
   所有数据都两两相加(包括自身相加),相同的合并为一个,再从小到大排列。
2020-04-10 23:57
HVB6
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:15
帖 子:331
专家分:561
注 册:2013-10-30
收藏
得分:20 
Private Sub Command1_Click()
   Dim s As String, s1, i, n, d, a(), b(), c(), m
   Set d = CreateObject("Scripting.Dictionary")
   s = "/6/12/18/30/42/60/72/102/108/138/150/180/192/198/228/240/270/282/312/348/420/432/462/522/570/600/618/642/660/810/822/828/858/882/1020/1032/1050/1062/1092/1152/1230/1278/1290/1302/1320/1428/1452/1482/1488/1608/1620/1668/1698/1722/1788/1872/1878/1932/1950/1998/2028/2082/2088/2112/2130/2142/2238/2268/2310/2340/2382/2550/2592/2658/2688/2712/2730/2790/2802/2970/3000/3120/3168/3252/3258/3300/3330/3360/3372/3390/3462/3468/3528/3540/3558/3582/3672/3768/3822/3852/3918/3930/4002/4020/4050/4092/4128/4158/4218/4230/4242/4260/4272/4338/4422/4482/4518/4548/4638/4650/4722/4788/4800/4932/4968/5010/5022/5100/5232/5280/5418/5442/5478/5502/5520/5640/5652/5658/5742/5850/5868/5880/6090/6132/6198/6270/6300/6360/6450/6552/6570/6660/6690/6702/6762/6780/6792/6828/6870/6948/6960/7128/7212/7308/7332/7350/7458/7488/7548/7560/7590/7758/7878/7950/8010/8088/8220/8232/8292/8388/8430/8538/8598/8628/8820/8838/8862/8970/9000/9012/9042/9240/9282/9342/9420/9432/9438/9462/9630/9678/9720/9768/9858/9930"
   s1 = Split(s, "/")
   j = UBound(s1)
   For k = 1 To j
      n = n + 1
       ReDim Preserve a(1 To n)
      a(n) = s1(n)
    Next
      n = 0
        For k = 1 To j
           For i = 1 To j
             n = n + 1
             ReDim Preserve c(1 To n)
            m = Val(a(k)) + Val(a(i))
            d(m) = ""
      Next
    Next
      n = 0
      m = d.Keys
      For i = 0 To d.Count - 1
          ReDim Preserve c(1 To i + 1)
          c(i + 1) = m(i)
      Next
     For i = 1 To UBound(c) - 1
        For j = i + 1 To UBound(c)
            If c(i) > c(j) Then
                TEMP = c(j)
                c(j) = c(i)
                c(i) = TEMP  'c数组是排序好的
            End If
        Next j
    Next i
  MsgBox "ok"
End Sub


[此贴子已经被作者于2020-4-11 12:29编辑过]

2020-04-11 12:27
ysr2857
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:34
帖 子:809
专家分:77
注 册:2020-2-10
收藏
得分:0 
回复 5楼 HVB6
谢谢老师!非常感谢!给你打分!
2020-04-11 16:36
ysr2857
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:34
帖 子:809
专家分:77
注 册:2020-2-10
收藏
得分:0 
终于搞到结果,如下为程序运行结果:
///30/36/42/48/54/60/66/72/78/84/90/102/108/114/120/126/132/138/144/150/156/162/168/174/180/186/192/198/204/210/216/222/228/234/240/246/252/258/264/270/276/282/288/294/300/306/312/318/324/330/336/342/348/354/360/366/372/378/384/390/396/408/414/420/426/432/438/444/450/456/462/468/474/480/486/492/498/504/510/522/528/534/540/546/552/558/564/570/576/582/588/594/600/606/612/618/624/630/636/642/648/654/660/666/672/678/684/690/696/702/708/714/720/726/732/738/744/750/756/762/768/774/780/792/798/804/810/816/822/828/834/840/846/852/858/864/870/876/882/888/894/900/912/918/924/930/936/942/948/954/960/966/972/978/984/990/996/1002/1008/1014/1020/1026/1032/1038/1044/1050/1056/1062/1068/1074/1080/1086/1092/1098/1104/1110/1122/1128/1134/1140/1152/1158/1164/1170/1176/1182/1188/1194/1200/1206/1212/1218/1224/1230/1236/1242/1248/1254/1260/1272/1278/1284/1290/1296/1302/1308/1314/1320/1326/1332/1338/1344/1350/1362/1368/1374/1380/1386/1392/1398/1404/1410/1416/1422/1428/1434/1440/1446/1452/1458/1464/1470/1476/1482/1488/1494/1500/1506/1512/1518/1524/1530/1536/1542/1548/1554/1560/1566/1572/1578/1584/1590/1596/1602/1608/1614/1620/1626/1632/1638/1644/1650/1656/1662/1668/1674/1680/1686/1692/1698/1704/1710/1716/1722/1728/1734/1740/1746/1752/1758/1764/1770/1776/1782/1788/1794/1800/1806/1812/1818/1824/1830/1836/1842/1848/1854/1860/1866/1872/1878/1884/1890/1896/1902/1908/1914/1920/1926/1932/1938/1944/1950/1956/1962/1968/1974/1980/1986/1992/1998/2004/2010/2016/2022/2028/2034/2040/2046/2052/2058/2064/2070/2076/2082/2088/2094/2100/2106/2112/2118/2124/2130/2136/2142/2148/2154/2160/2166/2172/2178/2184/2190/2196/2202/2208/2214/2220/2226/2232/2238/2244/2250/2256/2262/2268/2274/2280/2286/2292/2298/2304/2310/2316/2322/2328/2334/2340/2346/2352/2358/2364/2370/2376/2382/2388/2394/2400/2406/2412/2418/2424/2430/2436/2442/2448/2454/2460/2466/2472/2478/2484/2490/2496/2502/2508/2514/2520/2526/2532/2538/2544/2550/2556/2562/2568/2574/2580/2586/2592/2598/2604/2610/2616/2622/2628/2634/2640/2646/2652/2658/2664/2670/2676/2682/2688/2694/2700/2706/2712/2718/2724/2730/2736/2742/2748/2754/2760/2766/2772/2778/2784/2790/2796/2802/2808/2814/2820/2826/2832/2838/2844/2850/2856/2862/2868/2874/2880/2886/2892/2898/2904/2910/2916/2922/2928/2934/2940/2946/2952/2958/2964/2970/2976/2982/2988/2994/3000/3006/3012/3018/3024/3030/3036/3042/3048/3054/3060/3066/3072/3078/3084/3090/3096/3102/3108/3114/3120/3126/3132/3138/3144/3150/3156/3162/3168/3174/3180/3186/3192/3198/3204/3210/3216/3222/3228/3234/3240/3252/3258/3264/3270/3276/3282/3288/3294/3300/3306/3312/3318/3324/3330/3336/3342/3348/3354/3360/3366/3372/3378/3384/3390/3396/3402/3408/3414/3420/3426/3432/3438/3444/3450/3456/3462/3468/3474/3480/3486/3492/3498/3504/3510/3516/3522/3528/3534/3540/3546/3552/3558/3564/3570/3576/3582/3588/3594/3600/3606/3612/3618/3624/3630/3636/3642/3648/3654/3660/3666/3672/3678/3684/3690/3696/3702/3708/3714/3720/3726/3732/3738/3744/3750/3756/3762/3768/3774/3780/3786/3792/3798/3804/3810/3816/3822/3828/3834/3840/3846/3852/3858/3864/3870/3876/3882/3888/3894/3900/3906/3912/3918/3924/3930/3936/3942/3948/3954/3960/3966/3972/3978/3984/3990/3996/4002/4008/4014/4020/4026/4032/4038/4044/4050/4056/4062/4068/4074/4080/4086/4092/4098/4104/4110/4116/4122/4128/4134/4140/4146/4152/4158/4164/4170/4176/4182/4188/4194/4200/4212/4218/4224/4230/4236/4242/4248/4254/4260/4266/4272/4278/4284/4290/4296/4302/4308/4314/4320/4326/4332/4338/4344/4350/4356/4362/4368/4374/4380/4386/4392/4398/4404/4410/4416/4422/4428/4434/4440/4446/4452/4458/4464/4470/4476/4482/4488/4494/4500/4506/4512/4518/4524/4530/4536/4542/4548/4554/4560/4566/4572/4578/4584/4590/4596/4602/4608/4614/4620/4626/4632/4638/4644/4650/4656/4662/4668/4674/4680/4686/4692/4698/4704/4710/4716/4722/4728/4734/4740/4746/4752/4758/4764/4770/4776/4782/4788/4794/4800/4806/4812/4818/4824/4830/4836/4842/4848/4854/4860/4866/4872/4878/4884/4890/4896/4902/4908/4914/4920/4926/4932/4938/4944/4950/4956/4962/4968/4974/4980/4986/4992/4998/5004/5010/5016/5022/5028/5034/5040/5046/5052/5058/5064/5070/5076/5082/5088/5094/5100/5106/5112/5118/5124/5130/5136/5142/5148/5154/5160/5166/5172/5178/5184/5190/5196/5202/5208/5214/5220/5226/5232/5238/5244/5250/5256/5262/5268/5274/5280/5286/5292/5298/5304/5310/5316/5322/5328/5334/5340/5346/5352/5358/5364/5370/5376/5382/5388/5394/5400/5406/5412/5418/5424/5430/5436/5442/5448/5454/5460/5466/5472/5478/5484/5490/5496/5502/5508/5514/5520/5526/5532/5538/5544/5550/5556/5562/5568/5574/5580/5586/5592/5598/5604/5610/5616/5622/5628/5634/5640/5646/5652/5658/5664/5670/5676/5682/5688/5694/5700/5706/5712/5718/5724/5730/5736/5742/5748/5754/5760/5766/5772/5778/5784/5790/5796/5802/5808/5814/5820/5826/5832/5838/5844/5850/5856/5862/5868/5874/5880/5886/5892/5898/5904/5910/5916/5922/5928/5934/5940/5946/5952/5958/5964/5970/5976/5982/5988/5994/6000/6006/6012/6018/6024/6030/6036/6042/6048/6054/6060/6066/6072/6078/6084/6090/6096/6102/6108/6114/6120/6126/6132/6138/6144/6150/6156/6162/6168/6174/6180/6186/6192/6198/6204/6210/6216/6222/6228/6234/6240/6246/6252/6258/6264/6270/6276/6282/6288/6294/6300/6306/6312/6318/6324/6330/6336/6342/6348/6354/6360/6366/6372/6378/6384/6390/6396/6402/6408/6414/6420/6426/6432/6438/6444/6450/6456/6462/6468/6474/6480/6486/6492/6498/6504/6510/6516/6522/6528/6534/6540/6546/6552/6558/6564/6570/6576/6582/6588/6594/6600/6606/6612/6618/6624/6630/6636/6642/6648/6654/6660/6666/6672/6678/6684/6690/6696/6702/6708/6714/6720/6726/6732/6738/6744/6750/6756/6762/6768/6774/6780/6786/6792/6798/6804/6810/6816/6822/6828/6834/6840/6846/6852/6858/6864/6870/6876/6882/6888/6894/6900/6906/6912/6918/6924/6930/6936/6942/6948/6954/6960/6966/6972/6978/6984/6990/6996/7002/7008/7014/7020/7026/7032/7038/7044/7050/7056/7062/7068/7074/7080/7086/7092/7098/7104/7110/7116/7122/7128/7134/7140/7146/7152/7158/7164/7170/7176/7182/7188/7194/7200/7206/7212/7218/7224/7230/7236/7242/7248/7254/7260/7266/7272/7278/7284/7290/7296/7302/7308/7314/7320/7326/7332/7338/7344/7350/7356/7362/7368/7374/7380/7386/7392/7398/7404/7410/7416/7422/7428/7434/7440/7446/7452/7458/7464/7470/7476/7482/7488/7494/7500/7506/7512/7518/7524/7530/7536/7542/7548/7554/7560/7566/7572/7578/7584/7590/7596/7602/7608/7614/7620/7626/7632/7638/7644/7650/7656/7662/7668/7674/7680/7686/7692/7698/7704/7710/7716/7722/7728/7734/7740/7746/7752/7758/7764/7770/7776/7782/7788/7794/7800/7806/7812/7818/7824/7830/7836/7842/7848/7854/7860/7866/7872/7878/7884/7890/7896/7902/7908/7914/7920/7926/7932/7938/7944/7950/7956/7962/7968/7974/7980/7986/7992/7998/8004/8010/8016/8022/8028/8034/8040/8046/8052/8058/8064/8070/8076/8082/8088/8094/8100/8106/8112/8118/8124/8130/8136/8142/8148/8154/8160/8166/8172/8178/8184/8190/8196/8202/8208/8214/8220/8226/8232/8238/8244/8250/8256/8262/8268/8274/8280/8286/8292/8298/8304/8310/8316/8322/8328/8334/8340/8346/8352/8358/8364/8370/8376/8382/8388/8394/8400/8406/8412/8418/8424/8430/8436/8442/8448/8454/8460/8466/8472/8478/8484/8490/8496/8502/8508/8514/8520/8526/8532/8538/8544/8550/8556/8562/8568/8574/8580/8586/8592/8598/8604/8610/8616/8622/8628/8634/8640/8646/8652/8658/8664/8670/8676/8682/8688/8694/8700/8706/8712/8718/8724/8730/8736/8742/8748/8754/8760/8766/8772/8778/8784/8790/8796/8802/8808/8814/8820/8826/8832/8838/8844/8850/8856/8862/8868/8874/8880/8886/8892/8898/8904/8910/8916/8922/8928/8934/8940/8946/8952/8958/8964/8970/8976/8982/8988/8994/9000/9006/9012/9018/9024/9030/9036/9042/9048/9054/9060/9066/9072/9078/9084/9090/9096/9102/9108/9114/9120/9126/9132/9138/9144/9150/9156/9162/9168/9174/9180/9186/9192/9198/9204/9210/9216/9222/9228/9234/9240/9246/9252/9258/9264/9270/9276/9282/9288/9294/9300/9306/9312/9318/9324/9330/9336/9342/9348/9354/9360/9366/9372/9378/9384/9390/9396/9402/9408/9414/9420/9426/9432/9438/9444/9450/9456/9462/9468/9474/9480/9486/9492/9498/9504/9510/9516/9522/9528/9534/9540/9546/9552/9558/9564/9570/9576/9582/9588/9594/9600/9606/9612/9618/9624/9630/9636/9642/9648/9654/9660/9666/9672/9678/9684/9690/9696/9702/9708/9714/9720/9726/9732/9738/9744/9750/9756/9762/9768/9774/9780/9786/9792/9798/9804/9810/9816/9822/9828/9834/9840/9846/9852/9858/9864/9870/9876/9882/9888/9894/9900/9906/9912/9918/9924/9930/9936/9942/9948/9954/9960/9966/9972/9978/9984/9990/9996/10002/10008/10014/10020/10026/10032/10038/10044/10050/10056/10062/10068/10074/10080/10086/10092/10098/10104/10110/10116/10122/10128/10134/10140/10146/10152/10158/10164/10170/10176/10182/10188/10194/10200/10206/10212/10218/10224/10230/10236/10242/10248/10254/10260/10266/10272/10278/10284/10290/10296/10302/10308/10314/10320/10326/10332/10338/10344/10350/10356/10362/10368/10374/10380/10386/10392/10398/10404/10410/10416/10422/10428/10434/10440/10446/10452/10458/10464/10470/10476/10482/10488/10494/10500/10506/10512/10518/10524/10530/10536/10542/10548/10554/10560/10566/10572/10578/10584/10590/10596/10602/10608/10614/10620/10626/10632/10638/10644/10650/10656/10662/10668/10674/10680/10686/10692/10698/10704/10710/10716/10722/10728/10734/10740/10746/10752/10758/10764/10770/10776/10782/10788/10794/10800/10806/10812/10818/10824/10830/10836/10842/10848/10854/10860/10866/10872/10878/10884/10890/10896/10902/10908/10914/10920/10926/10932/10938/10944/10950/10956/10962/10968/10974/10980/10986/10992/10998/11004/11010/11016/11022/11028/11034/11040/11046/11052/11058/11064/11070/11076/11082/11088/11094/11100/11106/11112/11118/11124/11130/11136/11142/11148/11154/11160/11166/11172/11178/11184/11190/11196/11202/11208/11214/11220/11226/11232/11238/11244/11250/11256/11262/11268/11274/11280/11286/11292/11298/11304/11310/11316/11322/11328/11334/11340/11346/11352/11358/11364/11370/11376/11382/11388/11394/11400/11406/11412/11418/11424/11430/11436/11442/11448/11454/11460/11466/11472/11478/11484/11490/11496/11502/11508/11514/11520/11526/11532/11538/11544/11550/11556/11562/11568/11574/11580/11586/11592/11598/11604/11610/11616/11622/11628/11634/11640/11646/11652/11658/11664/11670/11676/11682/11688/11694/11700/11706/11712/11718/11724/11730/11736/11742/11748/11754/11760/11766/11772/11778/11784/11790/11796/11802/11808/11814/11820/11826/11832/11838/11844/11850/11856/11862/11868/11874/11880/11886/11892/11898/11904/11910/11916/11922/11928/11934/11940/11946/11952/11958/11964/11970/11976/11982/11988/11994/12000/12006/12012/12018/12024/12030/12036/12042/12048/12054/12060/12066/12072/12078/12084/12090/12096/12102/12108/12114/12120/12126/12132/12138/12144/12150/12156/12162/12168/12174/12180/12186/12192/12198/12204/12210/12216/12222/12228/12234/12240/12246/12252/12258/12264/12270/12276/12282/12288/12294/12300/12306/12312/12318/12324/12330/12336/12342/12348/12354/12360/12366/12372/12378/12384/12390/12396/12402/12408/12414/12420/12426/12432/12438/12444/12450/12456/12462/12468/12474/12480/12486/12492/12498/12504/12510/12516/12522/12528/12534/12540/12546/12552/12558/12564/12570/12582/12588/12594/12600/12606/12612/12618/12624/12630/12636/12642/12648/12654/12660/12666/12672/12678/12684/12690/12696/12702/12708/12714/12720/12726/12732/12738/12744/12750/12756/12762/12768/12774/12780/12786/12792/12798/12804/12810/12816/12822/12828/12834/12840/12846/12852/12858/12864/12870/12876/12882/12888/12894/12900/12906/12912/12918/12924/12930/12936/12942/12948/12954/12960/12966/12972/12978/12984/12990/12996/13002/13008/13014/13020/13026/13032/13038/13044/13050/13056/13062/13068/13074/13080/13086/13092/13098/13104/13110/13116/13122/13128/13134/13140/13146/13152/13158/13164/13170/13176/13182/13188/13194/13200/13206/13212/13218/13224/13230/13236/13242/13248/13254/13260/13266/13272/13278/13284/13290/13296/13302/13308/13314/13320/13326/13332/13338/13344/13350/13356/13362/13368/13374/13380/13386/13392/13398/13404/13410/13416/13422/13428/13434/13440/13446/13452/13458/13464/13470/13476/13482/13488/13494/13500/13506/13512/13518/13524/13530/13536/13542/13548/13554/13560/13566/13572/13578/13584/13590/13596/13602/13608/13614/13620/13626/13632/13638/13650/13656/13662/13668/13674/13680/13686/13692/13698/13704/13710/13722/13728/13734/13740/13746/13752/13758/13764/13770/13776/13782/13788/13794/13800/13806/13812/13818/13824/13830/13836/13842/13848/13854/13860/13866/13872/13878/13884/13890/13896/13902/13908/13914/13920/13926/13932/13938/13944/13950/13956/13962/13968/13974/13980/13986/13992/13998/14004/14010/14016/14022/14028/14034/14040/14046/14052/14058/14064/14070/14076/14082/14088/14094/14100/14106/14112/14118/14124/14130/14136/14142/14148/14154/14160/14172/14178/14184/14190/14196/14202/14208/14214/14220/14226/14232/14238/14244/14250/14256/14262/14268/14274/14280/14286/14292/14298/14304/14310/14316/14322/14328/14340/14352/14358/14364/14370/14376/14382/14388/14394/14400/14406/14412/14418/14424/14430/14436/14442/14448/14454/14460/14466/14472/14478/14484/14490/14496/14502/14508/14514/14520/14532/14538/14544/14550/14556/14562/14568/14574/14580/14586/14592/14598/14604/14610/14616/14622/14628/14640/14646/14652/14658/14664/14670/14676/14682/14688/14694/14700/14706/14712/14718/14724/14730/14736/14742/14748/14754/14760/14766/14772/14778/14784/14790/14796/14802/14808/14820/14826/14838/14844/14850/14856/14862/14868/14874/14880/14886/14892/14898/14904/14910/14916/14922/14928/14934/14940/14946/14952/14958/14964/14970/14976/14982/14988/14994/15000/15006/15012/15018/15024/15030/15036/15048/15054/15060/15066/15072/15078/15084/15090/15096/15102/15108/15114/15120/15132/15138/15144/15150/15156/15162/15168/15174/15180/15186/15192/15198/15204/15210/15216/15222/15228/15240/15246/15252/15258/15270/15276/15282/15288/15300/15306/15312/15318/15330/15336/15342/15348/15360/15366/15372/15378/15390/15396/15402/15408/15414/15420/15426/15432/15438/15444/15450/15456/15462/15468/15474/15480/15486/15492/15498/15504/15510/15516/15522/15528/15540/15546/15552/15558/15564/15570/15576/15582/15588/15594/15600/15612/15618/15624/15630/15636/15642/15648/15654/15660/15666/15672/15678/15690/15696/15702/15708/15714/15720/15726/15732/15738/15744/15750/15756/15762/15768/15774/15780/15786/15792/15798/15804/15810/15822/15828/15834/15840/15846/15852/15858/15870/15876/15882/15888/15894/15900/15906/15912/15918/15930/15936/15942/15948/15960/15966/15972/15978/15984/15990/15996/16002/16008/16014/16020/16026/16032/16038/16044/16050/16056/16062/16068/16074/16080/16086/16092/16098/16104/16110/16116/16122/16128/16134/16140/16146/16152/16158/16164/16170/16176/16182/16188/16194/16200/16212/16218/16224/16230/16242/16248/16254/16260/16266/16272/16278/16290/16296/16302/16308/16320/16326/16332/16338/16344/16350/16356/16362/16368/16374/16380/16386/16392/16398/16410/16416/16422/16428/16440/16452/16458/16464/16470/16476/16482/16488/16494/16500/16506/16512/16518/16524/16530/16548/16554/16560/16566/16572/16578/16584/16590/16596/16602/16608/16614/16620/16626/16632/16638/16644/16650/16662/16668/16674/16680/16686/16692/16698/16710/16716/16722/16728/16740/16746/16752/16758/16764/16770/16776/16782/16788/16794/16800/16806/16812/16818/16830/16842/16848/16860/16872/16878/16890/16896/16902/16908/16920/16926/16932/16938/16950/16962/16968/16980/16986/16992/16998/17010/17016/17022/17028/17040/17052/17058/17070/17076/17082/17088/17094/17100/17112/17118/17130/17136/17142/17154/17160/17166/17178/17190/17196/17202/17208/17220/17226/17232/17238/17244/17250/17256/17262/17268/17274/17280/17292/17298/17304/17310/17316/17328/17334/17340/17346/17352/17358/17370/17376/17382/17388/17400/17406/17412/17418/17430/17436/17442/17448/17460/17466/17472/17478/17490/17502/17508/17514/17520/17526/17532/17538/17550/17556/17562/17568/17574/17580/17598/17610/17616/17628/17634/17640/17646/17652/17658/17664/17670/17676/17682/17688/17694/17700/17712/17718/17724/17730/17736/17754/17766/17772/17778/17790/17808/17820/17826/17832/17838/17850/17856/17862/17868/17874/17880/17892/17898/17904/17910/17922/17940/17946/17952/17958/17970/17976/17982/17988/18000/18012/18018/18024/18030/18036/18042/18048/18054/18060/18066/18078/18084/18090/18102/18108/18120/18144/18150/18156/18162/18168/18180/18198/18204/18210/18216/18222/18228/18240/18246/18252/18258/18270/18276/18282/18288/18294/18300/18306/18312/18318/18324/18342/18348/18354/18360/18366/18384/18390/18396/18402/18408/18420/18432/18438/18444/18450/18456/18462/18468/18474/18480/18486/18492/18498/18504/18516/18522/18528/18540/18558/18564/18582/18588/18600/18606/18624/18630/18642/18648/18660/18672/18678/18684/18690/18696/18702/18714/18720/18732/18738/18744/18750/18762/18768/18774/18780/18792/18804/18810/18828/18840/18852/18858/18864/18870/18876/18882/18894/18900/18912/18918/18924/18930/18942/18960/18972/19002/19008/19020/19050/19062/19068/19092/19098/19110/19116/19140/19152/19158/19170/19182/19188/19200/19206/19212/19230/19260/19272/19278/19290/19296/19308/19320/19350/19356/19362/19368/19392/19398/19440/19446/19488/19536/19560/19578/19578/19626/19626/19626/19626/19626/
2020-04-11 17:35
ysr2857
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:34
帖 子:809
专家分:77
注 册:2020-2-10
收藏
得分:0 
内容太长,显示不完整,怎么处理?怎么能完整显示?
2020-04-11 17:37
ysr2857
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:34
帖 子:809
专家分:77
注 册:2020-2-10
收藏
得分:0 
这个是后面的部分:
15570/15576/15582/15588/15594/15600/15612/15618/15624/15630/15636/15642/15648/15654/15660/15666/15672/15678/15690/15696/15702/15708/15714/15720/15726/15732/15738/15744/15750/15756/15762/15768/15774/15780/15786/15792/15798/15804/15810/15822/15828/15834/15840/15846/15852/15858/15870/15876/15882/15888/15894/15900/15906/15912/15918/15930/15936/15942/15948/15960/15966/15972/

15978/15984/15990/15996/16002/16008/16014/16020/16026/16032/16038/16044/16050/16056/16062/16068/16074/16080/16086/16092/16098/16104/16110/16116/16122/16128/16134/16140/16146/16152/16158/16164/16170/16176/16182/16188/16194/16200/16212/16218/16224/16230/16242/16248/16254/16260/16266/16272/16278/16290/16296/16302/16308/16320/16326/16332/16338/16344/16350/16356/16362/16368/16374/16380/16386/16392/16398/16410/16416/16422/16428/16440/16452/16458/16464/16470/16476/16482/16488/16494/16500/16506/16512/16518/16524/16530/16548/16554/16560/16566/16572/16578/16584/16590/16596/16602/16608/16614/16620/16626/16632/16638/16644/16650/16662/16668/16674/16680/16686/16692/16698/16710/16716/16722/16728/16740/16746/16752/16758/16764/16770/16776/16782/16788/16794/16800/16806/16812/16818/16830/16842/16848/16860/16872/16878/16890/16896/16902/16908/16920/16926/16932/16938/16950/16962/16968/16980/16986/16992/16998/17010/17016/17022/17028/17040/17052/17058/17070/17076/17082/17088/17094/17100/17112/17118/17130/17136/17142/17154/17160/17166/17178/17190/17196/17202/17208/17220/17226/17232/17238/17244/17250/17256/17262/17268/17274/17280/17292/17298/17304/17310/17316/17328/17334/17340/17346/17352/17358/17370/17376/17382/17388/17400/17406/17412/17418/17430/17436/17442/17448/17460/17466/17472/17478/17490/17502/17508/17514/17520/17526/17532/17538/17550/17556/17562/17568/17574/17580/17598/17610/17616/17628/17634/17640/17646/17652/17658/17664/17670/17676/17682/17688/17694/17700/17712/17718/17724/17730/17736/17754/17766/17772/17778/17790/17808/17820/17826/17832/17838/17850/17856/17862/17868/17874/17880/17892/17898/17904/17910/17922/17940/17946/17952/17958/17970/17976/17982/17988/18000/18012/18018/18024/18030/18036/18042/18048/18054/18060/18066/18078/18084/18090/18102/18108/18120/18144/18150/18156/18162/18168/18180/18198/18204/18210/18216/18222/18228/18240/18246/18252/18258/18270/18276/18282/18288/18294/18300/18306/18312/18318/18324/18342/18348/18354/18360/18366/18384/18390/18396/18402/18408/18420/18432/18438/18444/18450/18456/18462/18468/18474/18480/18486/18492/18498/18504/18516/18522/18528/18540/18558/18564/18582/18588/18600/18606/18624/18630/18642/18648/18660/18672/18678/18684/18690/18696/18702/18714/18720/18732/18738/18744/18750/18762/18768/18774/18780/18792/18804/18810/18828/18840/18852/18858/18864/18870/18876/18882/18894/18900/18912/18918/18924/18930/18942/18960/18972/19002/19008/19020/19050/19062/19068/19092/19098/19110/19116/19140/19152/19158/19170/19182/19188/19200/19206/19212/19230/19260/19272/19278/19290/19296/19308/19320/19350/19356/19362/19368/19392/19398/19440/19446/19488/19536/19560/19578/19578/19626/19626/19626/19626/19626/
2020-04-11 17:41
ysr2857
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:34
帖 子:809
专家分:77
注 册:2020-2-10
收藏
得分:0 
小于30的咋没有了?不知道咋了?
如下是我添加了输出结果的程序:
Private Sub Command1_Click()
   Dim s As String, s1, i, n, d, a(), b(), c(), m
   Set d = CreateObject("Scripting.Dictionary")
   s = "/6/12/18/30/42/60/72/102/108/138/150/180/192/198/228/240/270/282/312/348/420/432/462/522/570/600/618/642/660/810/822/828/858/882/1020/1032/1050/1062/1092/1152/1230/1278/1290/1302/1320/1428/1452/1482/1488/1608/1620/1668/1698/1722/1788/1872/1878/1932/1950/1998/2028/2082/2088/2112/2130/2142/2238/2268/2310/2340/2382/2550/2592/2658/2688/2712/2730/2790/2802/2970/3000/3120/3168/3252/3258/3300/3330/3360/3372/3390/3462/3468/3528/3540/3558/3582/3672/3768/3822/3852/3918/3930/4002/4020/4050/4092/4128/4158/4218/4230/4242/4260/4272/4338/4422/4482/4518/4548/4638/4650/4722/4788/4800/4932/4968/5010/5022/5100/5232/5280/5418/5442/5478/5502/5520/5640/5652/5658/5742/5850/5868/5880/6090/6132/6198/6270/6300/6360/6450/6552/6570/6660/6690/6702/6762/6780/6792/6828/6870/6948/6960/7128/7212/7308/7332/7350/7458/7488/7548/7560/7590/7758/7878/7950/8010/8088/8220/8232/8292/8388/8430/8538/8598/8628/8820/8838/8862/8970/9000/9012/9042/9240/9282/9342/9420/9432/9438/9462/9630/9678/9720/9768/9858/9930"
   s1 = Split(s, "/")
   j = UBound(s1)
   For k = 1 To j
      n = n + 1
       ReDim Preserve a(1 To n)
      a(n) = s1(n)
    Next
      n = 0
        For k = 1 To j
           For i = 1 To j
             n = n + 1
             ReDim Preserve c(1 To n)
            m = Val(a(k)) + Val(a(i))
            d(m) = ""
      Next
    Next
      n = 0
      m = d.Keys
      For i = 0 To d.Count - 1
          ReDim Preserve c(1 To i + 1)
          c(i + 1) = m(i)
      Next
     For i = 1 To UBound(c) - 1
        For j = i + 1 To UBound(c)
            If c(i) > c(j) Then
                temp = c(j)
                c(j) = c(i)
                c(i) = temp  'c????????????
            End If
        Next j
        If i Mod 20 = 0 Then
        s104 = s104 & temp & "/" & vbCrLf
        Else
        s104 = s104 & temp & "/"
        End If
    Next i
    Print temp
  MsgBox "ok"
  Text1 = s104
End Sub



2020-04-11 17:57
快速回复:求各位老师做一个有关排序的vb程序,谢谢!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.031363 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved