I can’t understand what role of n in prime no. Why we use n-1 here n value is what??
Prime number
@discobot n is the no. which will be given to you in the input and you have to check whether n is prime no. of not. DO check if it prime or not you need to divide n by every number from 2 to n - 1 and we have started from 2 because we know if any no. is divisible except for 1 and itself then it not a prime no. so we didn’t include 1 and n itself. So we iterate over 2 to n-1 and if any no. divides n then n is not a prime no.
Hi! To find out what I can do, say @discobot display help
.