Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

An example Application of for Loop in VB language

Shulou Source: shulou.com Published: 2022-06-02 04:38:02 11月12日 Update

This article mainly introduces "the example application of VB language for cycle". In the daily operation, I believe that many people have doubts about the example application of VB language for cycle. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "the example application of VB language for cycle". Next, please follow the editor to study!

Knowledge objectives of this section:

Enter a number in the text box, click the output button, and print out the five-pointed lattice square on the form. Experience the power of the double for cycle.

Effect picture

The format of the for loop:

Declare a custom variable I

For initializes the last value of the custom variable I to variable I step step size

Here is the code to enter the loop

Next custom variable I

For example:

Dim i as integer

For iTunes 0 to 10 step 1

Print i

Next i

Results:

0

one

...

ten

Conclusion:

Initial variable

Tags: Loop output variable instance language Application Learning Pentagon Representative knowledge Pentagon one Line Code more case Square Square step size help next Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MySQL NVidia macOS Shulou Information