Write a Function for Natural Numbers sum up to n

January 23, 2010

Function NNumCou (n)
Dim num, sum
sum=0
For num= 1 to n step 1
sum= sum+num
Next
msgbox sum
End Function

You Might Also Like

0 comments