Embed presentation
Download to read offline


The program checks if a number is prime or not by using a for loop to divide the number by integers from 1 to itself, counting the number of times it is exactly divisible. If the count is 2, it means the number is only divisible by 1 and itself, so it prints that the number is prime. Otherwise, it prints that the number is not prime.
