討論串[問題] 九九乘法表不用迴圈是叫我直接從1列到81?
共 29 篇文章

推噓4(4推 0噓 2→)留言6則,0人參與, 5年前最新作者Inndy (Inndy)時間5年前 (2018/07/18 21:00), 編輯資訊
0
0
1
內容預覽:
https://gist.github.com/Inndy/1e32822802ca5517924009458d1825c2. --. 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.118.126.236. 文章網址: https://www.ptt.cc/bbs/C_and_C

推噓1(1推 0噓 0→)留言1則,0人參與, 5年前最新作者stimim (qqaa)時間5年前 (2018/07/19 23:19), 編輯資訊
0
0
3
內容預覽:
https://ideone.com/oPIC66. 用 C PreProcessor 寫的,理論上調整 EVAL 的數量的話,. 應該可以支援任意的 NxN 乘法表,沒有真的試過。. 我只有試過 #define END (9, 9) 的話,可以印出 98 * 98 ,大概要編譯 1 分半....
(還有106個字)

推噓17(17推 0噓 0→)留言17則,0人參與, 最新作者jserv (松鼠)時間5年前 (2018/07/21 02:21), 編輯資訊
1
1
0
內容預覽:
不用 iteration,就用 recursion,順便預測出題者還不准你用乘法操作。. 這裡提供一份實作程式碼:. #include <stdio.h>. int mul(int x, int y) {. if (!x || !y) return 0;. return x + mul(x, y -
(還有727個字)

推噓3(3推 0噓 0→)留言3則,0人參與, 5年前最新作者bbuc (C&C++完美經典)時間5年前 (2018/07/21 17:33), 5年前編輯資訊
0
1
0
內容預覽:
獻醜一下..... 稍微試著解決重複加法的問題. #include <stdio.h>. void func(int x,int y,int z) {. printf("%d x %d = %2d%s",x,y,z,((y==9)?"\n":" "));. if ( y == 9 && x < 9
(還有113個字)

推噓2(3推 1噓 1→)留言5則,0人參與, 5年前最新作者nobodycares (沒人在乎)時間5年前 (2018/07/22 16:44), 編輯資訊
0
0
0
內容預覽:
搞不好人家只是要你用stl跟c++11而已. #include <iostream>. #include <algorithm>. #include <vector>. #include <cstdint>. int main() {. std::vector<int> one_to_nine(9)
(還有496個字)