Reputation: 1 Apprentice
- New Members
- Active Posts:
- 8 (0.01 per day)
- 23-April 12
- Profile Views:
- Last Active:
- Jun 26 2012 12:25 AM
- Dream Kudos:
Posts I've Made
Posted 1 May 2012What does the Operator / do?
What is the return type?
Dim n As Int64= 44444444444444444 Dim r = r / 4
thanks for the reply
Operator / do integer division and return type is integer
here's my code：
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim s As Int64 = 1 Dim n As Int64 = 11111111111111111 For i = 2 To Math.Sqrt(n) Do While n <> i If n Mod i = 0 Then s = s * i n = n / i Else Exit Do End If Loop Next s = s * n MsgBox(s) End Sub
Posted 1 May 2012can someone reply me ?
Posted 25 Apr 2012two thing I see.
You index will be out of bounds as they are 0 based you need to remove 1 from the count.
and when you use a for loop in reverse you need to include a Step -1 to decrement the loop 1 count each iteration.
thanks for the help,it works well now
Posted 24 Apr 2012thanks for the reply,
i have complete this program with the new method i found,
（ps:this is not my homework and i'm learning vb.net by self study )
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Click here to e-mail me
Wix hasn't added any friends yet.