Well, OK, then the question is ambiguous:
Quote:
So what this is doing if I am correct, is calculating the square root of int n only once, then as long as double m is less than or equal to int i, it will keep looping, is this code right ?????
First part "calculating the square root of int n only once", to which the answer is yes.

Second part "then as long as double m is less than or equal to int i, it will keep looping". Yes, in a sense, but what I thought you were asking was about the higher level functionality, i.e. what is it actually doing rather than how is what it is doing implemented, which is that it is determining if the number is prime, using the square root it previously calculated and displayed.