討論串[問題]C++ 九九乘法表 如何用if來寫呢??
共 13 篇文章

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者lungswu (宅爸爸)時間16年前 (2010/02/02 14:43), 編輯資訊
0
0
1
內容預覽:
/*. * 這邊偷改一下V大的程式. *. * 老實說....還是不要用遞迴的好(好累). */. void show99(int i, int j). {. if (j > 0). {. show99(i, j - 1);. printf("%d*%d=%d ", j, i, i * j);. r
(還有12個字)

推噓1(1推 0噓 5→)留言6則,0人參與, 最新作者lianchiamin (lianchiamin)時間16年前 (2010/02/02 14:26), 編輯資訊
0
0
0
內容預覽:
謝謝大家的回文和推文。. 以下是我想出來的。. 程式碼:. #include <cstdlib>. #include <iostream>. using namespace std;. int main(int argc, char *argv[]). {. int i=2,j=2;. start:
(還有79個字)

推噓2(2推 0噓 0→)留言2則,0人參與, 最新作者VictorTom (鬼翼&娃娃魚)時間16年前 (2010/02/02 13:16), 編輯資訊
0
0
1
內容預覽:
#include <stdio.h>. #include <stdlib.h>. void show99(int col, int row, int rewind=1). {. if(col > 1 && rewind). {. show99(col-1, row, rewind);. printf
(還有255個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者realmeat (真肉)時間16年前 (2010/02/02 13:14), 編輯資訊
0
0
1
內容預覽:
一個function 解決, 變數名稱我故意的.... int OOXX(int xxoo, int ooxx, int oooo). {. if(xxoo <= oooo && ooxx > oooo){. xxoo ++;. ooxx = 1;. printf("\n", xxoo*ooxx);
(還有65個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者yauhh (喲)時間16年前 (2010/02/02 12:58), 編輯資訊
0
0
1
內容預覽:
應該是:. void multiple(int row, int col) {. if (row < 2) ... // Row base case. if (col < 1) ... // Secondary recursive case. // Following: Primary Recurs