Cognizant interview question

Write a code for checking prime numbers. Write a code to reverse a number.