討論串[問題] 打星號畫圖
共 12 篇文章
首頁
上一頁
1
2
3
下一頁
尾頁

推噓1(1推 0噓 5→)留言6則,0人參與, 最新作者ShortestPath (Dijkstra)時間15年前 (2009/11/15 06:41), 編輯資訊
0
0
0
內容預覽:
印星星最快的方法先寫到記憶體, 最後全部一次print出去. 一次一行跟一次一個字會慢一點, 大家可以試試看印10萬行的時間差. 當然也要準備10萬行的buff, 科科. char buff[10 * 7];. int main(). {. char *temp = buff;. for(int i
(還有250個字)

推噓1(1推 0噓 6→)留言7則,0人參與, 最新作者tokyobabylon (paris)時間15年前 (2009/11/15 04:58), 編輯資訊
0
0
0
內容預覽:
畫一菱形.... *. ***. *****. *******. *****. ***. *. #include<iostream>. #include<cstdlib>. using namespace std;. int main(void). {. int i,j;. int a1[7]={3
(還有108個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者adrianshum (Alien)時間15年前 (2009/11/05 02:35), 編輯資訊
0
0
0
內容預覽:
另一種類似的玩法. (這個是由 1顆 印至 n 顆). printStars(int levels) {. for (i = 1, currentLevel = 1; currentLevel < levels; ) {. printf("*");. ++i;. if ( i > currentLe

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者elfkiller (沒有暱稱)時間15年前 (2009/11/04 16:33), 編輯資訊
0
0
0
內容預覽:
#define TotalStarNumber 6. int j=1,k=2;. for(int i=1;i<=TotalStarNumber;++i){. cout<<'*';. if(i==j){. cout<<endl;. j+=k;. ++k;. }. }. --. 發信站: 批踢踢實業

推噓2(2推 0噓 0→)留言2則,0人參與, 最新作者ShortestPath (Dijkstra)時間15年前 (2009/11/04 16:10), 編輯資訊
0
0
0
內容預覽:
*. **. ***. **. *. for(int i = -2; i <= 2; i++). printf("%s\n", "***" + abs(i));. 請自行調整紅色的三個參數. --. WOW三寶 多龍 大總統 短路徑. WOW貼文大師 瘋法. WOW翻譯機 A-N-S-E-R (好像
首頁
上一頁
1
2
3
下一頁
尾頁