3 like 0 dislike
Write a program that reads an integer from 1~1000 and displays a message to indicate whether it is prime or not. Remember, a prime number is any integer greater than 1 with no divisor other than one and itself.

Sample Input 1:

1

Sample Output 1:

Not a prime number

Sample Input 2:

2

Sample Output 2:

It's a prime number

 

References: C From Theory
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (20.9k points)
ID: 21869 - Available when: Unlimited - Due to: Unlimited
| 35 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:3.239.58.199
©2016-2021

Related questions

3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Jan 25, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21796 - Available when: Unlimited - Due to: Unlimited
| 50 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Jan 25, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21795 - Available when: Unlimited - Due to: Unlimited
| 54 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 12, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21926 - Available when: Unlimited - Due to: Unlimited
| 87 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 12, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21923 - Available when: Unlimited - Due to: Unlimited
| 80 views
12,102 questions
157,995 answers
158,423 comments
4,502 users