ugmc
V2EX  ›  PHP

整数位数怎么分解?

  •  
  •   ugmc · May 3, 2015 · 4477 views
    This topic created in 4207 days ago, the information mentioned may be changed or developed.

    只分解十位,百位。
    比如:32345 十位:45,百位:323

    6 replies  •  2015-05-03 16:33:13 +08:00
    Nicksxs
    Nicksxs
    May 3, 2015
    1
    32345/100
    32345%100
    ?
    powergx
    powergx
    May 3, 2015
    2
    tostring().right(3)
    b821025551b
    b821025551b
    May 3, 2015
    3
    到底是取前面还是后面
    ugmc
    ugmc
    OP
    May 3, 2015
    4
    @b821025551b 最后两位设定为十位,剩下的设定为百位
    est
    est
    May 3, 2015
    5
    你是不是想自己实现百分比算法?
    Septembers
    Septembers
    May 3, 2015 via Android
    6
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   593 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 19:03 · PVG 03:03 · LAX 11:03 · JFK 14:03
    ♥ Do have faith in what you're doing.