看板 C_and_CPP 關於我們 聯絡資訊
#include <assert.h> #include <stdio.h> #include <curl/curl.h> int main(void) { CURL* curl = curl_easy_init(); assert(curl); assert(CURLE_OK == curl_easy_setopt(curl, CURLOPT_URL, "https://pastebin.com/raw/L4jHxUTA")); assert(CURLE_OK == curl_easy_setopt(curl, CURLOPT_WRITEDATA, stdout)); assert(CURLE_OK == curl_easy_perform(curl)); curl_easy_cleanup(curl); return 0; } // link with -lcurl (咦? ※ 引述《cutekid (可愛小孩子)》之銘言: : Goto版(但沒直接用Goto關鍵字): : #include <stdio.h> : #include <setjmp.h> : jmp_buf buf; : int main(void) { : int i = setjmp(buf) ; : if(i < 81){ : printf("%d x %d = %2d\n", i/9+1, i%9+1, (i/9+1) * (i%9+1)); : longjmp(buf,i + 1); : } : return 0; : } : ※ 引述《red0whale (red whale)》之銘言: : : 剛才做題目, : : https://i.imgur.com/NI4TYj5.jpg
: : 九九乘法表用兩個或一個迴圈來做我都會 : : 但不用迴圈叫我列九九乘法表是哪招? : : 難道是要我直接從1*1列到9*9嗎? : : 還是其實有妙招? : : 說實在我真想不到不用迴圈就能簡單列出九九乘法表的方法了 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.193.217 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1531739804.A.6A7.html ※ 編輯: PkmX (140.113.193.217), 07/16/2018 19:21:51
MOONRAKER: 連CURL都有 x_x 07/16 19:37
oToToT: ... 07/16 20:29
james732: 這會變成系列文嗎 XDDDD 07/16 21:00
yvb: 有時覺得系列惡搞文比伸手文更糟糕... 07/16 22:00
shadow0326: 我...我看這篇才知道可以不摳curl_global_init 07/16 22:54
tinlans: 現在大家都活在網路世代,先學習 libcurl 有備無患。 07/16 23:13
xvid: ..... 07/17 10:40
Neisseria: libcurl 真的是好物 (咦) 07/17 11:51
dou0228: curl: 我也是看報紙才知道,我也會寫 9 x 9 ... 07/24 16:46