herrDeng網內搜尋
自訂搜尋
Ads
2011年4月7日 星期四
訂閱:
張貼留言 (Atom)
熱門文章
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解...
-
你會用C的算子sizeof?
-
XOR prefixsum CPP python解Leetcode 1829 Maximum XOR for Each Query 其實這裡考慮的是元素個數為2^maximumBit的交換群,運算子為XOR。 [Python code請進]
-
Python C++使用字串find迴圈速解Leetcode 2490 Circular Sentence C++ & Python都有字串的find,用法都類似 split=s.find(' ', split+1)能找到s從index=split+1開...
55 則留言:
import java.util.*;
class java
{
public static void main(String [] args)throws Exception{
Scanner input=new Scanner(System.in);
System.out.println("請輸入月份");
int x=input.nextInt();
if((x>=1)&&(x<=12))
switch(x)
{
case 2:case 3:case 4:
System.out.println("春");
break;
case 5:case 6:case 7:
System.out.println("夏");
break;
case 8:case 9:case 10:
System.out.println("秋");
break;
case 11:case 12:case 1:
System.out.println("冬");
break;
}
}
}
import java.util.*;
class SwitchCase
{
public static void main(String[] args) throws Exception
{
Scanner input = new Scanner(System.in);
System.out.println("請輸入月份");
int x = input.nextInt();
switch(x)
{
case 2: case 3: case 4:
System.out.println("春天");
break;
case 5: case 6: case 7:
System.out.println("夏天");
break;
case 8: case 9: case 10:
System.out.println("秋天");
break;
case 11: case 12: case 1:
System.out.println("冬天");
break;
default :
System.out.println("錯誤");
}
}
}
import java.util.*;
class AA
{
public static void main (String [] arg)throws Exception
{
Scanner input=new Scanner(System.in);
int x=input.nextInt();
switch (x)
{
case 1:case 2:case 3:
System.out.println("春");
break;
case 4:case 5:case 6:
System.out.println("夏");
break;
case 7:case 8:case 9:
System.out.println("秋");
break;
case 10:case 11:case 12:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;
}
}
}
import java.util.*;
public class switchcase {
public static void main(String[] args)throws Exception
{
Scanner input =new Scanner(System.in);
int x;
{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2:case 3:case 4:
System.out.println("春");
break;
case 5:case 6:case 7:
System.out.println("夏");
break;
case 8:case 9:case 10:
System.out.println("秋");
break;
case 11:case 12:case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}
}
}
import java.util.*;
public class SwitchCase{
public static void main(String[] args) throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.print("輸入月份");
x=input.nextInt();
switch(x){
case 2:case 3:case 4:
System.out.println("春");
break;
case 5:case 6:case 7:
System.out.println("夏");
break;
case 8:case 9:case 10:
System.out.println("秋");
break;
case 11:case 12:case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;
}
}while(x!=0);
}
}
import java.util.*;
class jjj
{
public static void main(String [] arg) throws Exception
{
Scanner input=new Scanner(System.in);
System.out.println("請輸入月份");
int x=input.nextInt();
if((x>=1)&&(x<=12))
switch(x)
{
case 2:case 3:case 4:
System.out.println("春");
break;
case 5:case 6:case 7:
System.out.println("夏");
break;
case 8:case 9:case 10:
System.out.println("秋");
break;
case 11:case 12:case 1:
System.out.println("冬");
break;
}
}
}
import java.util.*;
public class jc
{
public static void main(String[] arg)
throws Exception
{
Scanner input=new Scanner(System.in);
int x;
do
{
System.out.println("輸入月份");
x=input.nextInt();
switch(x)
{
case 3:case 4:case 5:
System.out.println("春");
break;
case 6:case 7:case 8:
System.out.println("夏");
break;
case 9:case 10:case 11:
System.out.println("秋");
break;
case 12:case 1:case 2:
System.out.println("冬");
break;
default:
System.out.println("查無此月");
}
}
while(x!=99);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3 : case 4:
System.out.println("春");
break;
case 5: case 6 : case 7:
System.out.println("夏");
break;
case 8: case 9 : case 10:
System.out.println("秋");
break;
case 11: case 12 : case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}while(x!=0);
}
}
import java.util.*;
public class Switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("春");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("輸入錯誤");
}
}while(x!=0);
}
}
import java.util.*;
public class Switchcase {
public static void main(String[] args)
throws Exception {
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}while(x!=0);
}
}
import java.util.*;
public class kang117 {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
}
}while (x!=0);
}
}
import java.util.*;
public class Switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("春");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class Switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class Switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
class java
{
public static void main(String [] arg) throws Exception{
Scanner input=new Scanner(System.in);
int x;
{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
}
import java.util.*;
public class SwitchCase {
public static void main (String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}while(x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3 : case 4:
System.out.println("春");
break;
case 5: case 6 : case 7:
System.out.println("夏");
break;
case 8: case 9 : case 10:
System.out.println("秋");
break;
case 11: case 12 : case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}while(x!=0);
}
}
import java.util.*;
public class w {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
}
}while (x!=0);
}
}
import java.util.*;
public class SwitchCase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2:case 3:case 4:
System.out.println("春");
break;
case 5:case 6:case 7:
System.out.println("夏");
break;
case 8:case 9:case 10:
System.out.println("秋");
break;
case 11:case 12:case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;
}
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3 : case 4:
System.out.println("春");
break;
case 5: case 6 : case 7:
System.out.println("夏");
break;
case 8: case 9 : case 10:
System.out.println("秋");
break;
case 11: case 12 : case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}while(x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3 : case 4:
System.out.println("春");
break;
case 5: case 6 : case 7:
System.out.println("夏");
break;
case 8: case 9 : case 10:
System.out.println("秋");
break;
case 11: case 12 : case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}while(x!=0);
}
}
import java.util.*;
public class java{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("Spring");
break;
case 5: case 6: case 7:
System.out.println("Summer");
break;
case 8: case 9: case 10:
System.out.println("Fall");
break;
case 11: case 12: case 1:
System.out.println("Winter");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3 : case 4:
System.out.println("春");
break;
case 5: case 6 : case 7:
System.out.println("夏");
break;
case 8: case 9 : case 10:
System.out.println("秋");
break;
case 11: case 12 : case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}while(x!=0);
}
}
import java.util.*;
public class kang {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
default:
System.out.println("請不要打其他怪怪的詞彙 謝謝合作!!");
}
}while (x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args) throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("請輸入月份");
x=input.nextInt();
switch(x){
case 2:case 3:case 4:
System.out.println("春");
break;
case 5:case 6:case 7:
System.out.println("夏");
break;
case 8:case 9:case 10:
System.out.println("秋");
break;
case 11:case 12:case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}while(x!=0);
}
}
import java.util.*;
public class Switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class switchcase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.print("請輸入月份:");
x=input.nextInt();
switch(x){
case 2:case 3:case 4:
System.out.println("春天");
break;
case 5:case 6:case 7:
System.out.println("夏天");
break;
case 8:case 9:case 10:
System.out.println("秋天");
break;
case 11:case 12:case 1:
System.out.println("冬天");
break;
default:
System.out.println("輸入錯誤");
}
}
}
import java.util.*;
public class Switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3 : case 4:
System.out.println("春");
break;
case 5: case 6 : case 7:
System.out.println("夏");
break;
case 8: case 9 : case 10:
System.out.println("秋");
break;
case 11: case 12 : case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}while(x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main (String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
default:
case 5: case 6: case 7:
System.out.println("夏");
break;
default:
case 8: case 9: case 10:
System.out.println("秋");
break;
default:
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("不是春天");
}
}(x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception {
Scanner input=new Scanner(System.in);
int x;
System.out.println("請輸入月份:");
x=input.nextInt();
switch(x){
case 2:case 3:case 4:
System.out.println("春");
break;
case 5:case 6:case 7:
System.out.println("夏");
break;
case 8:case 9:case 10:
System.out.println("秋");
break;
case 11:case 12:case 1:
System.out.println("冬");
break;
default:
System.out.println("輸入錯誤");
break;
}
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3 : case 4:
System.out.println("春");
break;
case 5: case 6 : case 7:
System.out.println("夏");
break;
case 8: case 9 : case 10:
System.out.println("秋");
break;
case 11: case 12 : case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
break;}
}while(x!=0);
}
}
import java.util.*;
public class switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class SwitchCase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("請輸入");
do{
x=input.nextInt();
switch(x){
case 12:case 1:case 2:
System.out.println("冬");
break;
case 3:case 4:case 5:
System.out.println("春");
break;
case 9:case 10:case 11:
System.out.println("秋");
break;
case 6:case 7:case 8:
System.out.println("夏");
break;
default:
System.out.println("結束");
}
}while (x!=0);
}
}
import java.util.*;
public class switchcase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.print("請輸入月份:");
x=input.nextInt();
switch(x){
case 2:case 3:case 4:
System.out.println("春天");
break;
case 5:case 6:case 7:
System.out.println("夏天");
break;
case 8:case 9:case 10:
System.out.println("秋天");
break;
case 11:case 12:case 1:
System.out.println("冬天");
break;
default:
System.out.println("輸入錯誤");
break;
}
}
}
import java.util.*;
public class apple{
public static void main (String[] args)
throws Exception{
Scanner input=new Scanner (System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("結束");
}
}while(x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String [] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
}
}while(x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args) throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 1: case 2: case 3:
System.out.println("春");
break;
case 4: case 5: case 6:
System.out.println("夏");
break;
case 7: case 8: case 9:
System.out.println("秋");
break;
case 10: case 11: case 12:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}while(x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}while(x!=0);
}
}
import java.util.*;
public class SwitchCase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}while(x!=0);
}
}
import java.util.*;
public class switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class ddd {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
default:
System.out.println("錯誤!!");
}
}while (x!=0);
}
}
import java.util.*;
public class ccc {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
default:
System.out.println("錯誤!!");
}
}while (x!=0);
}
}
import java.util.*;
public class switchcase {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
default:
System.out.println("說出你的願望");
}
}while (x!=0);
}
}
import java.util.*;
public class switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x = input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}while(x!=0);
}
}
import java.util.*;
public class Switchcase{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("春");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
import java.util.*;
public class SwitchCase {
public static void main (String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
default:
case 5: case 6: case 7:
System.out.println("夏");
break;
default:
case 8: case 9: case 10:
System.out.println("秋");
break;
default:
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("不是春天");
}
}(x!=0);
}
}
import java.util.*;
public class Swithcase {
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份 話季節");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("夏");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("輸入錯誤");
}
}while(x!=0);
}
}
import java.util.*;
public class ba {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
default:
System.out.println("說出你的願望");
}
}while (x!=0);
}
}
import java.util.*;
public class wen {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
default:
System.out.println("說出你的願望");
}
}while (x!=0);
}
}
import java.util.*;
public class cyu {
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
default:
System.out.println("說出你的願望");
}
}while (x!=0);
}
}
import java.util.*;
public class abc
public static void main(String[] args) throws Exception
{ Scanner input=new Scanner(System.in);
int x ;
do{ System.out.println("輸入幾月份");
x=input.nextInt();
switch(x){
case 3 : case 4 :case 5:
System.out.println("春");
break;
case 6 : case 7 :case 8:
System.out.println("夏");
break;
case 9 : case 10 :case 11:
System.out.println("秋");
break;
case 12 : case 1 :case 2:
System.out.println("冬");
break;
default:
System.out.println("說出你的願望");
}
}while (x!=0);
}
}
import java.util.*;
public class smile{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
do{
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春天");
break;
case 5: case 6: case 7:
System.out.println("夏天");
break;
case 8: case 9: case 10:
System.out.println("秋天");
break;
case 11: case 12: case 1:
System.out.println("冬天");
break;
default:
System.out.println("錯了");
}
}while(x!=0);
}
}
import java.util.*;
public class b9933079{
public static void main(String[] args)
throws Exception{
Scanner input=new Scanner(System.in);
int x;
System.out.println("輸入月份");
x=input.nextInt();
switch(x){
case 2: case 3: case 4:
System.out.println("春");
break;
case 5: case 6: case 7:
System.out.println("春");
break;
case 8: case 9: case 10:
System.out.println("秋");
break;
case 11: case 12: case 1:
System.out.println("冬");
break;
default:
System.out.println("錯誤");
}
}
}
張貼留言