摘要: public int GetMonthOfQuarter(int month) { int num = month % 3; if (num == 0) { return 3; } return num; }有更好的算法欢迎各位留言拍砖 转载请注明出处 阅读全文
posted @ 2012-02-28 17:55 深海大虾 阅读(833) 评论(2) 推荐(0)
摘要: public int ConvertMonthToQuarter(int month) { double f = Convert.ToDouble(month)/3f; if (f > Convert.ToInt32(f)) { return Convert.ToInt32(f) + 1; } return Convert.ToInt32(f); }欢迎路过的各位前来拍砖留言发表更简洁性能更高的算法,我会在第一... 阅读全文
posted @ 2012-02-28 17:43 深海大虾 阅读(3800) 评论(1) 推荐(0)