在一定范围内均匀分布的整数

Lets say I have a range between 0 and 100 and I want an array returned containing 3 integers which are evenly distributed within that range, what would be the best way to do this?

For example:

Range: 0-100
Wanted: 3
Returned: 25, 50, 75

查看全部
dsjxgu4759
dsjxgu4759
2010/03/01 02:48
  • numbers
  • range
  • php
  • integer
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

4个回复