黑马程序员技术交流社区

标题: 有了这,女朋友还有用么? [打印本页]

作者: 乐丶小洛    时间: 2016-7-24 14:55
标题: 有了这,女朋友还有用么?
String[] names = {"苍井空","波多野结衣","野宫里美","橘梨纱","松岛枫","大沢佑香","朱音唯","香山圣","麻仓优","吉沢明歩","樱理惠","冬月楓","竹內愛","七海奈奈","七海奈奈",
                      "秋元美由","遥惠美","佐藤遥希","大月麻友花","美優千奈","結川るり","麻生希","京香じゅりあ","立花静","西野翔","白石茉莉奈","上原亚衣","赤井美月","爱田友","宇都宫紫苑",
                      "初音实","山咲舞","坂口美穗乃","泷泽萝拉","小川あさ美","雪本芽衣","大橋未久","星野美优","野村萌香","神波多一花","香澄乃亞","上原瑞穗","加藤莉娜","北条麻妃","花井美沙",
                      "蒂亚ティア","原千草","真白美那","咲夜由愛","早川濑里奈","月野里沙","桃谷绘里香","白咲舞","永沢まおみ","天衣美津","小向まな美","管野靜香","冴岛香织","歩原ひかる",
                      "逢田美波","小泽玛利亚","吉川爱美","板野有紀","松本芽依","杏树纱奈","宇佐美なな","前田香织","水无濑优夏"," つぼみ 蕾","成濑心美","愛沢有紗","瑠川莉娜","村上里沙",
                      "石川施恩惠","瑞樹ララ","茜あずさ","愛実れい","夏目奈奈","清见玲","藤本もも","双葉みか","希崎杰西卡","纱仓真奈","羽田爱","菅野さゆき","藤浦惠","池田美和子","安達亜美",
                      "笹原莉梦","上原结衣","櫻井莉亞","雪見紗弥","雾岛奈津美","前田陽菜","橘綺羅","小島南","爱乃娜美","初美理音","藤原瞳","樱井步"};

               
                while(true){
       
                        double random = Math.random();
                        random*=names.length;

                        int index = (int)random;
                        System.out.println(names[index]+"送你了,要继续吗?");

                        System.out.println("按任意键继续,0结束本次翻牌");
                        java.util.Scanner sc = new java.util.Scanner(System.in);
                        int input = sc.nextInt();
                        if(input == 0){
                                break;
                        }
                }
纯属娱乐,看着玩吧,从群里看到的  嘿嘿
作者: jmf332376308    时间: 2016-7-24 15:32
哈哈哈...我来刷分
作者: beckhamgun    时间: 2016-7-24 17:54
不给种的都死了
作者: qetu001212    时间: 2016-7-24 19:15
深得冯佳老师真传~~~!
作者: 乐丶小洛    时间: 2016-7-25 21:45
老司机老司机
作者: z6677    时间: 2016-7-25 21:52
老司机哈哈
作者: 黑马YJM    时间: 2016-7-25 22:38
污`````呜呜呜呜     静静的路过!!

老司机呀老司机

为啥不用集合存放这些 名字字符串.  感觉用集合比较方便.....!!!


作者: blackhorse1    时间: 2016-7-25 22:44
冯佳老师有点低俗,,,不过善于调动气氛...不多说了,就这样




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2