import java.util.*; public class test4{ public static void main(String[] args);
importjava.util.*;publicclasstest4{publicstaticvoidmain(String[]args);System.out.prin...
import java.util.*;
public class test4{
public static void main(String[] args);
System.out.println("输入一个整数: ");
Scanner in=new Scanner(System.in);
int score =in.nextInt();
if(score=0){
System.out.println("白猪");
}
if(score=1){
System.out.println("黑猪");
}
if(score=2){
System.out.println("红猪");
}
if(score>2){
System.out.println("变形猪");
}
}各位大神哪里错了? 展开
public class test4{
public static void main(String[] args);
System.out.println("输入一个整数: ");
Scanner in=new Scanner(System.in);
int score =in.nextInt();
if(score=0){
System.out.println("白猪");
}
if(score=1){
System.out.println("黑猪");
}
if(score=2){
System.out.println("红猪");
}
if(score>2){
System.out.println("变形猪");
}
}各位大神哪里错了? 展开
2017-02-13
展开全部
import java.util.*;
public class test4 {
public static void main(String[] args) {
System.out.println("输入一个整数: ");
Scanner in = new Scanner(System.in);
int score = in.nextInt();
if (score == 0) {
System.out.println("白猪");
}
if (score == 1) {
System.out.println("黑猪");
}
if (score == 2) {
System.out.println("红猪");
}
if (score > 2) {
System.out.println("变形猪");
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询