CG Infinity interview question

Prime number code to write in any lang