Why we are using n-1 in while condition of the loop. For checking prime

https://online.codingblocks.com/app/player/199225/content/187013/405/lecture#