#C10170. Prime Number Checker
Prime Number Checker
Prime Number Checker
Given an integer \(n\), determine whether it is a prime number.
A prime number is an integer greater than 1 that has no divisors other than 1 and itself. Formally, a number \(n\) is prime if for all integers \(a\) such that \(2 \leq a \leq \sqrt{n}\), \(a\) does not divide \(n\) evenly. That is, there is no integer \(a\) satisfying \(2 \leq a \leq \sqrt{n}\) and \(n \mod a = 0\).
Your task is to write a program that reads an integer from standard input and prints True
if the number is prime and False
otherwise.
inputFormat
The input consists of a single line containing an integer \(n\), which you need to check for primality.
outputFormat
Output a single line: True
if \(n\) is a prime number, otherwise False
.
1
False