3 喜歡 0 不喜歡
69 瀏覽
Write a program that reads an integer in [0,20] and displays its factorial, else display Invalid number. Note: n!=1*2*3*....*n , 0!=1.

Sample Input 1:

5

Sample Output 1:

120

Sample Input 2:

21

Sample Output 2:

Invalid number

 

References: C From Theory
[正常] Coding (C) - 最新提問 分類:Introduction to Computer Programming I (C) | 用戶: (20.9k 分)
ID: 21862 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 69 瀏覽
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.127.166
©2016-2024

相關問題

6 喜歡 0 不喜歡
0 回答
[正常] Coding (C) - 最新提問 10月 16, 2017 分類:Introduction to Computer Programming I (C) | 用戶: thopd (12.1k 分)
ID: 27173 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 220 瀏覽
6 喜歡 0 不喜歡
0 回答
[正常] Coding (C) - 最新提問 10月 10, 2017 分類:Introduction to Computer Programming I (C) | 用戶: thopd (12.1k 分)
ID: 25999 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 109 瀏覽
3 喜歡 0 不喜歡
0 回答
[正常] Coding (C) - 最新提問 1月 25, 2017 分類:Introduction to Computer Programming I (C) | 用戶: The Contributor (20.9k 分)
ID: 21793 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 83 瀏覽
12,783 問題
183,443 回答
172,219 留言
4,824 用戶