Amadeus interview question

Program for Prime Number