Fortune-based fortune-telling, fortune-telling refers to the rough classification of fate, but divides fate into fifty-one categories. Therefore, the investigation of fate is not meticulous and inaccurate, which can be referenced by supply and demand testers.
The algorithm Baidu does not elaborate on the http://baike.baidu.com/view/3205806.htm
Code:
/** To change this template, choose tools | templates * and open the template in the editor. */package javachenggu;/** bone fortune computing algorithm ** @ author luozhuang master♂Luo yun*/public class luozhuangchenggu {int YY [] = {0, 6, 8, 7, 5, 15, 6, 16, 15, 7, 9, 12, 10, 7, 15, 6, 5, 14, 14, 9, 7, 7, 9, 12, 8, 7, 13, 5, 14, 5, 9, 17, 5, 7, 12, 8, 8, 6, 19, 6, 8, 16, 10, 6, 12, 9, 6, 7, 12, 5, 9, 8, 7, 8, 15, 9, 16, 8, 8, 19, 12}; int mm [] = {0, 6, 7, 18, 9, 5, 16, 9, 15, 18, 8, 9, 5}; int dd [] = {0, 5, 10, 8, 15, 16, 15, 8, 16, 16, 16, 16, 19, 17, 8, 17, 10, 8, 9, 18, 5, 15, 10, 9, 8, 9, 15, 18, 7, 8, 16, 6}; int HH [] = {0, 0, 6, 7, 10, 9, 16, 10, 8, 8, 9, 6, 6, 16 }; /***** @ Param year * @ Param month * @ Param day * @ Param hour * @ return */Public String chenggu (INT year, int month, int day, int hour) {int Zong, zong1, zong2, N; If (hour % 2 = 0) {n = (hour + 2)/2 ;} else {n = (hour + 3)/2;} Zong = YY [(year-1821) % 60 + 1] + mm [month] + dd [Day] + HH [N]; Zong1 = Zong % 10; zong2 = Zong/10; system. Out. Print ("your life has" + zong2 + "two" + zong1 + "money! \ N "); Return" your life is "+ zong2 +" two "+ zong1 +" money! \ N ";}/*** @ Param ARGs the command line arguments */public static void main (string [] ARGs) {luozhuangchenggu my = new luozhuangchenggu (); my. chenggu (1846, 2, 14, 2 );}}