Skip to content
CampusEduX

Check Prime Number

Easyjavapythonccppjavascript

Given an integer N, determine whether it is a prime number. A prime number is greater than 1 and has exactly two positive divisors: 1 and itself.

Input Format

A single line containing the integer N.

Output Format

Print 1 if N is prime, otherwise print 0.

Related Problems

  • Greatest Common Divisor
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Least Common Multiple
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Count Digits and Digit Sum
    Easy · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...