Reputation: 29
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"?
Upvotes: 1
Views: 346
Reputation: 24808
Because you declared a variable called t
here:
var i,t uint64 = 2,3
but never used that variable.
Upvotes: 7