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
| 21 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.62.14
©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
| 36 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
| 42 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
| 74 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
| 65 views
11,638 questions
147,708 answers
153,259 comments
4,159 users