Find Max from List Box Tutorial Using a While Loop in Visual Basic - VB.Net Algorithm

  Рет қаралды 26,864

Ken Swartwout

Ken Swartwout

Күн бұрын

Пікірлер: 23
@johnsonjeremiah3
@johnsonjeremiah3 11 жыл бұрын
Thanks Ken. I am studying for a Intro to VB exam and your videos are a great supplement to my professor, who is great but difficult to understand sometimes.
@KenSwartwout
@KenSwartwout 11 жыл бұрын
Thanks for the feedback! A For/Next loop is just a different syntax - it would be less lines of code. You just have to familiarize yourself with the For/Next syntax. Essentially, the counter is declared and incremented on the same line as the For statement. Your condition will be the same - you will compare the counter with the list box size. My video on For/Next should help - sorry I can't post a link.
@KenSwartwout
@KenSwartwout 11 жыл бұрын
The solution would be similar to this example. The difference would be that you calculate a running total as opposed to a running maximum. You would iterate through the list box in the same fashion and examine each item but replace comparisons with addition. Good luck!
@LuizSlivinski
@LuizSlivinski 7 жыл бұрын
Thank you very much Ken. Your explanation of your logic was very helpful. It helped me a lot. Thank you very much! I just don't know how you would do it in a fewer lines (like you mentioned in the video) than the example you used here using For/Next loop.
@HussainAlMarkhi
@HussainAlMarkhi 11 жыл бұрын
I just came here to say thank you so much I have pass my exam easily and there was a question similar to this one so it was really easy to me , it really was something different which is how to check the max in 4 listbox but I have made one and put it in a function and just copying and changing the listbox name and it's work perfectly :D thank you so much
@Mithfir
@Mithfir 11 жыл бұрын
Many thanks, I'm just starting out with VB and it really helped me out. Subbed!
@KenSwartwout
@KenSwartwout 11 жыл бұрын
Glad to hear it. I am working on creating a better library of content.
@KenSwartwout
@KenSwartwout 11 жыл бұрын
Thanks for the feedback. Glad to help!
@ameer101202
@ameer101202 10 жыл бұрын
Thanks a lot ! you made things much more easier for me!
@spangleryamish7529
@spangleryamish7529 4 жыл бұрын
can you show how we could find the number of grades above the average
@bmanning1989
@bmanning1989 11 жыл бұрын
I am trying to add numbers to a list box and sort them min and max. Can you help me?
@RickyFuto
@RickyFuto 11 жыл бұрын
How can I sum all items in a listbox using While Loop? I was able to do it with the For Each method but I am asked to do it using While loop.
@notsonathan
@notsonathan 10 жыл бұрын
dude i have a problem , the code is correct, but whenever i click the buttom max.. It doesn't recognize the last number i put in the list.
@ghostxshot
@ghostxshot 4 жыл бұрын
5 years later, where he said add the -1, don't do that.
@notsonathan
@notsonathan 10 жыл бұрын
Can you also put the code for finding the average? Thanks :)
@KenSwartwout
@KenSwartwout 11 жыл бұрын
You are welcome.
@rjc131
@rjc131 9 жыл бұрын
I am learning console apps, Could you do one that takes 1 penny the first day 2 pennies the second day 4 pennies the third day 8 on the fourth and so on, but have to ask the user to input the number of days and the final amount has to be in dollars and cents format...... if you could do that it would be awesome, Thank you
@inyuashathizz
@inyuashathizz 9 жыл бұрын
+Robert Carlson Public Class frmSumOfNumbers Private Sub btnEnterNumbers_Click(sender As Object, e As EventArgs) Handles btnEnterNumbers.Click 'INPUT 'Declare Variables Dim intSum As Integer Dim intNumber As Integer 'Use number enetered by user Try intNumber = InputBox("Input a Positive Value:", "Input Needed", "10") 'Displays warning if user inputs value 0, or below If intNumber
@richardhill4136
@richardhill4136 3 жыл бұрын
How I would love for him to teach me one on one in VB
@gobakamohammed6924
@gobakamohammed6924 5 жыл бұрын
thanks a lot
@Sinred1
@Sinred1 11 жыл бұрын
thanks a lot, really helped :)
@Biak_rayau
@Biak_rayau 9 жыл бұрын
thanks
Nested Loop Tutorial Using a While Loop - VB.Net
6:40
Ken Swartwout
Рет қаралды 14 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Visual Basic .NET Tutorial 7 - How to use a Listbox in VB.NET
6:49
ProgrammingKnowledge
Рет қаралды 273 М.
Visual Basic.NET Programming. Beginner Lesson 15. Do While
8:46
Computer Science Lessons
Рет қаралды 18 М.
VB.net: Search and select item in Listbox then get value and item text in labels
6:51
Visual Basic .NET Tutorial 17 - Understanding For Loop in VB.NET
5:19
ProgrammingKnowledge
Рет қаралды 119 М.
Find max min While Loop
11:43
Danny Hardin
Рет қаралды 71 М.
HOW TO FIND LOWEST AND HIGHEST VALUE OF ARRAY VALUES USING VISUAL BASIC
22:34