CJCoding With Joseph
15free / daySign inCreate account

Check Prime Number (for input)

Read an integer n from standard input and decide whether it is prime. Print exactly Prime if it is, or Not prime if it is not. A number is prime when it is greater than 1 and has no divisor other than 1 and itself.

For input 7 the output is exactly what is shown in Expected Output.

For input 9 the output is:

Not prime

Expected Output:

Prime

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
Loops
📥 Auto-Input:
7\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.