C++ 點把number 轉成英文 plx help

2008-09-26 6:11 am
Write a program that converts input numbers(1- 50)to english.
Use switch control structures and use as few cases as possible(using 50 case are not allowed).


唔可以用if else,不過可以用ternary conditional operator,姐係cout <<grade>=60?:passed":"failed");




plx help
更新1:

可唔可以打埋個program出黎?

回答 (1)

2008-09-26 8:58 am
✔ 最佳答案
11-20你都要逐個做 (10個可能性)
1-10, 21-50, 頭一個位5可能性,後面個位10個可能性
10+5+10 = 25 個可能, 小過50個



收錄日期: 2021-04-21 13:40:59
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080925000051KK02180

檢視 Wayback Machine 備份