'Coding has over 700 languages', '67% of programming jobs aren’t in the technology industry', 'Coding is behind almost everything that is powered by electricity'
Topics

Prime Number

Easy
0/40
1 upvote
Asked in companies
Tata Consultancy Services (TCS)ShareChatCognizant

Problem statement

Write a Program to check whether the given number N is prime or not.

For a given number N check if it is prime or not. A prime number is a number that is only divisible by 1 and itself.
Detailed explanation ( Input/output format, Notes, Images )
Constraints :
0 <= N <= 10,000
Sample Input 1 :
5
Sample Output 1 :
true
Sample Input 2 :
10
Sample Output 2 :
false
Explanation of Input 2:
10 has 2 factors 2, 5.
Full screen
Console