[問題] 這題目要的意思是??
我是個初學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
10/18 06:39, 1F
→
10/18 11:30, , 2F
10/18 11:30, 2F
→
10/18 11:31, , 3F
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
10/18 21:43, 8F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 3 篇):
問題
2
8