Algorithm 5: Check whether a number is prime or not Step 1: Start Step 2: Declare variables n, i, flag. Step 3: Initialize variables flag ← 1 i ← 2 Step 4: Read n from the user. Step 5: Repeat the steps until i=(n/2) 5.1 If remainder of n÷i equals 0 flag ← 0 Go ...