C# GUI application that stores an array and displays the highest and lowest numbers by clicking a button

后端 未结 2 1069
故里飘歌
故里飘歌 2021-01-29 08:43

Background:
This is updated from 13 hours ago as I have been researching and experimenting with this for a few. I\'m new to this programming arena so I\'ll b

2条回答
  •  隐瞒了意图╮
    2021-01-29 09:02

    This in all probability being a homework I will not provide entire solution but just provide a hint.

    Task to me seems to be to some how accept 10 integers and then show smallest and largest of them. For this there is no need to maintain an array (off-course only if maintaining an array is itself not part of the problem). You just need to keep track of current minimum and current maximum.

    As and when you receive an input compare it with the current minimum and maximum and update them accordingly. e.g.

    if(num < curr_min) curr_min = num;
    

提交回复
热议问题