if(score>80)
{if(sex.equals("女")){System.out.println("进入女子组决赛");}
else{System.out.println("进入男子组决赛");}}
else if(score<=80){System.out.println("进不了决赛");}
{if(sex.equals("女")){System.out.println("进入女子组决赛");}
else{System.out.println("进入男子组决赛");}}
else if(score<=80){System.out.println("进不了决赛");}
2015-07-23
public class HelloWorld {
public static void main(String[] args) {
int score = 53;
int count = 0;
System.out.ptintln("加分前成绩");
if(score<60){
while(score<60){
score++;
count++;
}
System.out.println("加分后成绩"+score);
System.out.println("共加了"+count"次!");
}
}
}
public static void main(String[] args) {
int score = 53;
int count = 0;
System.out.ptintln("加分前成绩");
if(score<60){
while(score<60){
score++;
count++;
}
System.out.println("加分后成绩"+score);
System.out.println("共加了"+count"次!");
}
}
}
public class HelloWorld{
public static void main(String[] args) {
String city="常德";
System.out.println("我的家乡在:"+city);
}
}
public static void main(String[] args) {
String city="常德";
System.out.println("我的家乡在:"+city);
}
}
2015-07-23