看板 Programming 關於我們 聯絡資訊
有辦法直接把數字跟數字之間,平均分成N段嗎? 譬如,我手裡有4個數,分別是100、200、300、400 有沒有辦法,利用程式,直接把數字跟數字之間...平均分成100段 出來的結果就是: 100、101、102、103、104......200、201、202....300、301、302....400 因為我現在手裡有4000個數字,要把它們每兩個數字之間,平均分成100段 不想手動,但忘記方法 囧 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.38.134.12 ※ 文章網址: https://www.ptt.cc/bbs/Programming/M.1530699404.A.6A9.html
adrianshum: 和程式沒啥關係。單純是數學而已 45.64.240.89 07/04 21:10
adrianshum: d = (end-start)/100 45.64.240.89 07/04 21:12
adrianshum: start , start+d , start+2d, start+3 45.64.240.89 07/04 21:14
adrianshum: d ... 45.64.240.89 07/04 21:14
Ecampus: 喔喔!!! 我試一下這回圈 114.38.134.12 07/04 22:46
Ecampus: thanks~ 114.38.134.12 07/04 22:46
MOONRAKER: 問:我有一根柴很長 放不進爐門 怎麼辦 220.135.118.23 07/05 10:53
MOONRAKER: 答: 橫著放進去 220.135.118.23 07/05 10:54