日期:2014-05-18 浏览次数:20944 次
int[] arr = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; double x = 2.3; int Split = 5; int resultX = (int)x; int resultY = (int)(x * 10 % 10); int result = resultX * Split + resultY - 1; Console.WriteLine(arr[result]);