Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Wednesday, August 10, 2011

VB-98 : Print Even numbers upto n

Print even numbers upto 50 (Taken from VB-Tutorial CDs ..)


Refer Collect and List positive integers also.



(A)Program Design : 




(B) Property(Controls Used) :
  • One Command Button with Caption Print and Name Command1

(C) Attaching Code to the Object :

Private Sub Command1_Click()
Dim counter As Integer
counter = 0
While counter < 50
counter = counter + 2
Print counter
Wend
End Sub

(D) Output :




(E) Errors :
 If found any errors while running your VB program, please note it on Comment section.
====================================================================
=========================================================

No comments: