ugmc
V2EX  ›  PHP

整数位数怎么分解?

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

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

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