Board logo

標題: 206 [打印本頁]

作者: 陳柏融    時間: 2023-10-19 15:24     標題: 206

import java.util.Scanner;

public class JPD02 {

        public static void main(String[] args) {
                int s=0;
                final String dreams = "There are moments in life when you miss someone so much that "
                                + "you just want to pick them from your dreams and hug them for real! Dream what "
                                + "you want to dream; go where you want to go; be what you want to be, because you have "
                                + "only one life and one chance to do all the things you want to do";

                Scanner sc = new Scanner(System.in);
                String a=sc.next();
                while(dreams==a){
                        s++;
                }
                System.out.print(s);

        }
}




歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/) Powered by Discuz! 7.2