herrDeng網內搜尋

自訂搜尋

Ads

2011年4月7日 星期四

Switch case

55 則留言:

B9933100 提到...

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;
}
}
}

B9733202 提到...

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("錯誤");
}
}
}

B9933065 提到...

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;
}

}
}

B9933085 提到...

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;}
}
}
}

B9933061 提到...

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);
}

}

B9933068 提到...

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;
}
}
}

B9933074 提到...

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);
}
}

B9933069 提到...

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);
}
}

b9933114 提到...

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("錯誤");
}
}
}

b9933109 提到...

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);
}
}

b9933099 提到...

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);
}
}

B9933070 提到...

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);


}
}

B9933096 提到...

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("錯誤");
}
}
}

b9933114 提到...

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("錯誤");
}
}
}

b9933114 提到...

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("錯誤");
}
}
}

B9933106 提到...

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("錯誤");
}
}
}
}

B9933098 提到...

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);
}
}

B9933103 提到...

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);
}
}

B9933067 提到...

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);


}
}

B9933108 提到...

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;
}
}
}

b9933076 提到...

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);
}
}

B9933102 提到...

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);
}
}

B9933071 提到...

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("錯誤");
}
}
}

b9933092 提到...

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);
}
}

B9933070 提到...

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);


}
}

B9933066 提到...

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);
}
}

B99330969 提到...

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("錯誤");
}
}
}

b9933110 提到...

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("輸入錯誤");

}
}

}

B9933096 提到...

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("錯誤");
}
}
}

B9933090 提到...

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);
}
}

B9933072 提到...

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);
}
}

b9933097 提到...

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;
}
}
}

B9933084 提到...

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);
}
}

b9933089 提到...

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("錯誤");
}
}
}

A9933058 提到...

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);
}
}

b9933110 提到...

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;
}
}

}

a9933056 提到...

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);
}
}

A9933059 提到...

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);
}
}

b9933093 提到...

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);
}
}

B9933078 提到...

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);
}
}

b9933064 提到...

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);
}
}

b9933087 提到...

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("錯誤");
}
}
}

B9933088 提到...

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);


}
}

B9933107 提到...

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);


}
}

b9933115 提到...

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);
}
}

B9613128 提到...

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);
}
}

b9933083 提到...

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("錯誤");
}
}
}

B9933072 提到...

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);
}
}

B9933116 提到...

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);

}
}

B9933073 提到...

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);

}
}

B9933063 提到...

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);

}
}

B9933080 提到...

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);

}
}

b9933091 提到...

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);

}
}

b9633038 提到...

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);
}

}

b9933079 提到...

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("錯誤");
}
}
}

Related Posts Plugin for WordPress, Blogger...

熱門文章