You are on page 1of 1

START

Ask an input (int) from the user and store it in variable num

Assume that the input was a prime number (boolean isPrime = true)

Let i be an integer with value of 2 (int i = 2) %n(rement i b) * (i+ + ) )es

!oes i divides num" (num#i= = $)

no

%s i less than or e&ual to i'2"

)es

no

Assign false to isPrime (isPrime = false)

!ispla) ,num is a PR%/01

!ispla) ,num is -.T a PR%/01

0-!

You might also like