从100个数字中查找最小的数字...?

编程入门 行业动态 更新时间:2024-10-10 05:17:01
本文介绍了从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个数字中查找最小的数字...?

本文发布于:2023-11-29 10:05:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1646094.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数字   最小

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!