WAP in C to find number is prime or not
AnswerBot
1y
WAP in C to check if a number is prime or not
Take input from user
Loop from 2 to n/2 and check if n is divisible by any number
If divisible, then not prime. Else, prime
Print the result
Help your peers!
Add answer anonymously...
Top TCS Associate System Engineer Trainee interview questions & answers
Top HR questions asked in TCS Associate System Engineer Trainee
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