//求籤程式一般版
public static void main(String[] args) {
String 籤詩1 = "第一籤\n\n 上吉\n 善才參世尊 寶馬盈門吉慶多。官司有理勸調和。萬般得利稱全福。一箭紅心定中科。";
String 籤詩2 = "第三籤 上上 梁山伯訪友 瑞氣騰騰最吉祥。行人有利即還鄉。";
String 籤詩3 = "第四籤 上上 唐三藏取經 在家富貴足安然。出外如同透碧天。秀士名登龍虎榜。農夫得遇大豐年。";
double 亂數 = Math.random() * 3;
double 整數亂數 = Math.floor(亂數);
if (整數亂數 == 0) {
System.out.println(籤詩1);
} else if (整數亂數 == 1) {
System.out.println(籤詩2);
} else if (整數亂數 == 2) {
System.out.println(籤詩3);
}
}
}
//求籤程式陣列版
public class NewClass {
public static void main(String[] args) {