Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (anonymous):

what is looping in basic?

OpenStudy (anonymous):

repeat given instructions while certain condition is true

OpenStudy (anonymous):

in vb.net looping is where you have something repeat itself until it meets a certain condition, or it's condition becomes true. this is an example of a simple console application. Module Module1 Sub Main() Dim X As Integer X = 9 Do System.Console.WriteLine(X) X = X - 1 Loop until x = 1 End Sub End Module in this program we tell the computer that x = 9. Then the computer writes what x is = to (which right now is 9) then we tell the computer that x does not = 9, but it = x - 1. So now the computer is thinking that x = 8 (9 - 1 is 8.) then because of the "do" above "System.Console.WriteLine(X)" and the "Loop until x = 1" the program will continue to "writeline(x)" and subtract 1 from x everytime it "loops." and it will continue to loop until x = 1, but it will not print 1 because it only loops until x = 1. so when x does = 1 it wont go back up to the top and "writeline(x)." if i had written the program "loop while x >= 1 instead of "loop until." it would have printed the number 1 also. Hope this helps.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!