Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. fun squareBetweenExists(m: Int, n: Int): Boolean {
  2. if ((m==n) && (m*m == n*n)) return true
  3. for (i in m..n) {
  4. if ((i * i >= m) && (i * i <= n)) return true
  5. else if (i * i > n) return false
  6. else continue
  7. }
  8. return false
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement