In the following code:
func PrimeF(n uint64) {
var i,t uint64 = 2,3
for ; i < n; {
if n%i == 0 {
n /= i
}
}
}
Why do I get the error message: "t declared and not used"?
In the following code:
func PrimeF(n uint64) {
var i,t uint64 = 2,3
for ; i < n; {
if n%i == 0 {
n /= i
}
}
}
Why do I get the error message: "t declared and not used"?
Because you declared a variable called t
here:
var i,t uint64 = 2,3
but never used that variable.