3 like 0 dislike
65 views
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
| 65 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.7.193
©2016-2024

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
| 89 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
| 107 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
| 116 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
| 120 views
12,783 questions
183,443 answers
172,219 comments
4,824 users