---
title: "Discussion on \"Simple check for square root in a loop using integers alone\" | Hashnode"
description: "Discussion on \"Simple check for square root in a loop using integers alone\". There was a situation where I couldn't get to use decimal / floating numbers in a variable or like in sqrt($n).\nTo check for a prime number, we need to check all odd numbers till the square root of a number for modulus 0. If n mod i is zero then it's..."
url: "https://hashnode.com/posts/simple-check-for-square-root-in-a-loop-using-integers-alone/610acd8a6a61354c8ab76c8a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Simple check for square root in a loop using integers alone](https://anjanesh.dev/simple-check-for-square-root-in-a-loop-using-integers-alone?utm_source=hashnode&utm_medium=feed)

There was a situation where I couldn't get to use decimal / floating numbers in a variable or like in sqrt($n). To check for a prime number, we need to check all odd numbers till the square root of a number for modulus 0. If n mod i is zero then it's...

Aug 4, 2021 · 2 min read · anjanesh.dev  
Read the article

-   [#php](https://hashnode.com/tag/php)

## Written by

[Anjanesh Lekshminarayanan](https://hashnode.com/@anjanesh)

@anjanesh · Navi Mumbai, MH

  
[View profile](https://hashnode.com/@anjanesh)

Web UI Engineer

I am a web consultant from Navi Mumbai. Mainly dealt with LAMP stack, now into Django and getting into Laravel and Cloud. Founder of nerul.in and gaali.in

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
