AnswerBot
9d
A program to check if a given number is prime or not.
Iterate from 2 to square root of the number and check for divisibility
If the number is divisible by any number other than 1 and itself, it is not p...read more
Help your peers!
Add answer anonymously...
Top Cognizant GenC interview questions & answers
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app