if(score>80){
if(sex=="女"){
System.out.println("进入女子组决赛");
}
else{
System.out.println("进入男子组决赛");
}
}
else{
System.out.println("你先回去等通知吧!");
}
if(sex=="女"){
System.out.println("进入女子组决赛");
}
else{
System.out.println("进入男子组决赛");
}
}
else{
System.out.println("你先回去等通知吧!");
}
2022-01-21
int age=25;
if(age>60){
System.out.println("老年");
} else if(age>=40){
System.out.println("中年");
} else if(age>=18){
System.out.println("青年");
} else {
System.out.println("童年");
}
if(age>60){
System.out.println("老年");
} else if(age>=40){
System.out.println("中年");
} else if(age>=18){
System.out.println("青年");
} else {
System.out.println("童年");
}
2022-01-21
if(age>18){
System.out.println("成年");
}
else{
System.out.println("未成年");
}
System.out.println("成年");
}
else{
System.out.println("未成年");
}
2022-01-21
System.out.println(a&&b);
System.out.println(a||b);
System.out.println(!c);
System.out.println(c^d);
System.out.println(a||b);
System.out.println(!c);
System.out.println(c^d);
2022-01-20
public class HelloWorld{
public static void main(String[] args) {
final String love="男";
final String love1="女";
System.out.println(love);
System.out.println(love1);
}
}
public static void main(String[] args) {
final String love="男";
final String love1="女";
System.out.println(love);
System.out.println(love1);
}
}
2022-01-18
public class HelloWorld {
public static void main(String[] args) {
int age=25;if(age>60){
System.out.println("老年");
}else if(age>40){
System.out.println("中年");
} else if(age>18){
System.out.println("少年");
}else{
System.out.println("童年");}
public static void main(String[] args) {
int age=25;if(age>60){
System.out.println("老年");
}else if(age>40){
System.out.println("中年");
} else if(age>18){
System.out.println("少年");
}else{
System.out.println("童年");}
2022-01-16
public class HelloWorld{
public static void main(String[] args) {
double avg1=78.5;
int rise=5;
double avg2=avg1+rise;
System.out.println("考试平均分:"+avg1);
System.out.println("调整后的平均分:"+avg2);
}
}
public static void main(String[] args) {
double avg1=78.5;
int rise=5;
double avg2=avg1+rise;
System.out.println("考试平均分:"+avg1);
System.out.println("调整后的平均分:"+avg2);
}
}
2022-01-12
String name="爱慕课";
char sex='男';
int num=18;
double price=120.5;
boolean isOK=true;
System.out.println(name);
System.out.println(sex);
System.out.println(num);
System.out.println(price);
System.out.println(isOK);
}
}
char sex='男';
int num=18;
double price=120.5;
boolean isOK=true;
System.out.println(name);
System.out.println(sex);
System.out.println(num);
System.out.println(price);
System.out.println(isOK);
}
}
2022-01-11
public class HelloWorld{
public static void main(String[] args) {
String Zw="我爱慕课网";
String Yw="www.imooc.com";
System.out.println(Zw+'\n'+Yw);
}
}
public static void main(String[] args) {
String Zw="我爱慕课网";
String Yw="www.imooc.com";
System.out.println(Zw+'\n'+Yw);
}
}
2022-01-11
public class HelloWorld{
public static void main(String[] args) {
final char MALE = '女';
final String FEMALE = "男";
double age = 18;
System.out.println(MALE);
System.out.println(FEMALE);
System.out.println(age);
}
}
这样也能过
public static void main(String[] args) {
final char MALE = '女';
final String FEMALE = "男";
double age = 18;
System.out.println(MALE);
System.out.println(FEMALE);
System.out.println(age);
}
}
这样也能过
2022-01-05