问题描述
我只想知道在一些随机数之间找到最小值和最大值的逻辑,例如
1 2 3 4 5 6或43 7 98 0 89任何想法?PLS!
i just wanna know the logic to find minimum and maximum between some random numbers such as
1 2 3 4 5 6 or 43 7 98 0 89 any ideas?PLS!
推荐答案
英语我会比较像
这样的数字
1 2 3 4
它会像
1< 2>>>>>>> 1分钟2max
2< 3>>>>>>> 2分钟3max
3< 4>>>>>>>> 3min 4max
然后我会将mins和maxes比较为
1< 2>>>>> 1分钟2max
2< 3>>>>> 2分钟3max
__________
2< 3 2min 3max
3< 4 3min 4 max
再一次
1< 2 1分2max sooooo分钟将是1
____________
3< 4 3min 4max sooooo max将是4
i想到代码3天,你们至少可以给我一个提示来进行统计!!!!
in english language i will compare the numbers like for
1 2 3 4
it will be like
1<2 >>>>>>1min 2max
2<3>>>>>>>2min 3max
3<4>>>>>>>3min 4max
then i will compare mins and maxes together like
1<2>>>>>1min 2max
2<3>>>>>2min 3max
__________
2<3 2min 3max
3<4 3min 4 max
one more time
1<2 1min 2max sooooo min will be 1
____________
3<4 3min 4max sooooo max will be 4
i thought about the code for 3 day can you guys at least give me a hint to statrt with!!!!
这篇关于计算最小值和最大值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!