◆两仪式 yuyuuyuuuyuuuu
关注数: 8 粉丝数: 162 发帖数: 7,312 关注贴吧数: 156
刚刚开始自学Java,刚刚学到用eclipse就遇到难题了,求助大佬们~ 为什么下面这段代码在cmd运行得好好的,在eclipse就显示error,还不给原因…… public class FortuneTest { public static void main(String[] args) { double d=Math.random(); double p=(double)100-100*d; if(p<=25) { System.out.println("从者:"); double ds=Math.random(); double ps=(double)100-100*ds; if(ps<=5) { System.out.print("☆☆☆☆☆SSR "); double ds5=Math.random(); int ps5=1+(int)(ds5*2); if(ps5==1) { System.out.print("Caster 诸葛孔明"); } if(ps5==2) { System.out.print("Saber 阿尔托莉雅·潘德拉贡"); } } if(ps>5&&ps<=20) { System.out.print("☆☆☆☆SR "); double ds5=Math.random(); int ps5=1+(int)(ds5*2); if(ps5==1) { System.out.print("Caster 美狄亚(Lily)"); } if(ps5==2) { System.out.print("Saber 齐格飞"); } } if(ps>20) { System.out.print("☆☆☆R "); int ps5=1+(int)(ds*2); if(ps5==1) { System.out.print("Caster 美狄亚"); } if(ps5==2) { System.out.print("Saber 吉尔·德·雷"); } } } if(p>25) { System.out.println("概念礼装:"); double dl=Math.random(); double pl=(double)100-100*dl; if(pl<=5) { System.out.print("☆☆☆☆☆SSR "); double dl5=Math.random(); int pl5=1+(int)(dl5*2); if(pl5==1) { System.out.print("2030年的碎片"); } if(pl5==2) { System.out.print("万华镜"); } } if(pl>5&&pl<=20) { System.out.print("☆☆☆☆SR "); double dl5=Math.random(); int pl5=1+(int)(dl5*2); if(pl5==1) { System.out.print("死灵魔术"); } if(pl5==2) { System.out.print("骑士的矜持"); } } if(pl>20) { System.out.print("☆☆☆R "); double dl5=Math.random(); int pl5=1+(int)(dl5*2); if(pl5==1) { System.out.print("符文石"); } if(pl5==2) { System.out.print("柳洞寺"); } } } } }
首页 1 2 下一页