1

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"?

2
  • you can also mute veritable like this: var i,_ uint64 = 2,3 Commented Oct 14, 2013 at 17:08
  • Your post is a statement, not a question. Can you phrase it so it actually asks something (that way, other users can understand what they should answer)? Commented Mar 2, 2014 at 5:26

1 Answer 1

7

Because you declared a variable called t here:

var i,t uint64 = 2,3

but never used that variable.

Sign up to request clarification or add additional context in comments.

1 Comment

Oh! Right. I'm did not know. Thank you quick answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.