Skip to main content
Hide Sidebar
Show Sidebar
<Progzoo Sections>
ProgZoo
Tutorials
How to...
Assessments
Help
<Other>
To do list
Recent changes
Random page
Personal
Log in / create account
Views
VB
Discussion
View source
History
Toolbox
What links here
Related changes
Special pages
Printable version
Tutorials
SET07102
Guides
Log in
Java
C#
C++
Perl
PHP
Python
Ruby
VB
VB:Sum an Array
From Progzoo
VB:Top Ten Tips
Hello World
Convert to Number
Read Text File
Sum an Array
Count 0 to 9
Hash Table
Regular Expression
Read Database
Read XML
Define a Class
You can add the numbers in the array [6,7,29] using a loop.
.
Module Demo Sub Main() Dim acc As Integer = 0 Dim i As Integer Dim a() As Integer = {6,7,29} For i=LBound(a) To UBound(a) acc = acc + a(i) Next Console.WriteLine(acc) End Sub End Module
[
Font
] [
Default
] [
Show
] [
Resize
] [
History
] [
Profile
]
test text