3 喜歡 0 不喜歡
69 瀏覽
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
[正常] Coding (C) - 最新提問 分類:Introduction to Computer Programming I (C) | 用戶: (20.9k 分)
ID: 21869 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 69 瀏覽
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.100.189
©2016-2024

相關問題

3 喜歡 0 不喜歡
0 回答
[正常] Coding (C) - 最新提問 1月 25, 2017 分類:Introduction to Computer Programming I (C) | 用戶: The Contributor (20.9k 分)
ID: 21796 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 90 瀏覽
3 喜歡 0 不喜歡
0 回答
[正常] Coding (C) - 最新提問 1月 25, 2017 分類:Introduction to Computer Programming I (C) | 用戶: The Contributor (20.9k 分)
ID: 21795 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 109 瀏覽
3 喜歡 0 不喜歡
0 回答
[正常] 開放式問答 - 最新提問 2月 12, 2017 分類:Introduction to Computer Programming I (C) | 用戶: The Contributor (20.9k 分)
ID: 21926 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 117 瀏覽
3 喜歡 0 不喜歡
0 回答
[正常] 開放式問答 - 最新提問 2月 12, 2017 分類:Introduction to Computer Programming I (C) | 用戶: The Contributor (20.9k 分)
ID: 21923 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 120 瀏覽
12,783 問題
183,443 回答
172,219 留言
4,824 用戶