Pergunta de entrevista da empresa Cogent Infotech Corp

Write a method to determine if a number is prime.