[問題] 這題目要的意思是??

看板C_and_CPP作者 (紅豬)時間13年前 (2010/10/18 04:46), 編輯推噓2(206)
留言8則, 7人參與, 最新討論串1/3 (看更多)
我是個初學C語言的高中生... 最近在寫一些簡單的程式 老師出了一些題目當作業..其中一題為以下 題目: Printing patterns 。 a. Write a function with the header Void line(int n , char c) Which will print n copies of the character c followed by a new line. b. Use this function in a program which reads in an integer and prints a triangle of the specified number of lines,in the following format: How main lines? 4 * ** *** **** c. Use this function in a program which reads in an integer and prints a triangle of the specified number of lines,in the following format: How main lines? 5 ********* ******* ***** *** * b跟c兩題我用for迴圈的方式可以寫得出來...我看不太懂a是要我寫甚麼??? 有利害的大大可以跟我解說嗎? 謝謝 ^^ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.255.70.110

10/18 06:39, , 1F
func沒有回傳值,c字元一行連印n次
10/18 06:39, 1F

10/18 11:30, , 2F
我挺好奇哪間高中有教C語言阿!!
10/18 11:30, 2F

10/18 11:31, , 3F
跟樓上有相同的疑問 XD
10/18 11:31, 3F

10/18 11:35, , 4F
高職就有了啊
10/18 11:35, 4F

10/18 12:53, , 5F
高中通常都是電研社之類的社團在研究 //我就是
10/18 12:53, 5F

10/18 16:04, , 6F
成功還師大附中電研社很強...
10/18 16:04, 6F

10/18 17:21, , 7F
今年金牌是師大附中,敝校只拿了一個小銀牌= ="
10/18 17:21, 7F

10/18 21:43, , 8F
我記得建中有教c++??
10/18 21:43, 8F
文章代碼(AID): #1Cks2XOM (C_and_CPP)
文章代碼(AID): #1Cks2XOM (C_and_CPP)