本文介绍了从100个数字中查找最小的数字...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用vb6从100多个数字中找到最小的数字.
I want to find smallest number from more than 100 numbers using vb6.
推荐答案对数字进行迭代,并跟踪您拥有的最小数字到目前为止发现.最后,您将拥有最小的.我不了解VB6,但方法相当简单. Iterate through the numbers, and keep track of the smallest one you''ve found so far. At the end, you''ll have the smallest. I don''t know VB6 but the method is fairly straight forward.
尝试以下代码: Try this codes: int lowest = 2147483647; int[] nums = {4,2,1,74,6,77}; foreach(int num in nums) { if(num < lowest) { lowest = num; } }
问候, 爱德华
Regards, Eduard
更多推荐
从100个数字中查找最小的数字...?
发布评论