Algoworks Interview Question

Write code to find prime number in java or c