public class HelloWorld {
public static void main(String[] args){
int one =20;
String mark=(one%2!=0)?"one是奇数":"one是偶数";
System.out.println( mark );
}
}
public static void main(String[] args){
int one =20;
String mark=(one%2!=0)?"one是奇数":"one是偶数";
System.out.println( mark );
}
}
2015-03-15
*
**
***
****
*****
******
*******
********
*********
**********
***********
************
*************
**************
***************
****************
*****************
******************
*******************
********************
**
***
****
*****
******
*******
********
*********
**********
***********
************
*************
**************
***************
****************
*****************
******************
*******************
********************
2015-03-15
System.out.println("加分前成绩:"+score);
//打印输出加分前成绩
for(score=53;score<60;score++) {
count++;
}
System.out.println("加分后成绩:"+score);
System.out.println("共加了"+count+"次");
//打印输出加分前成绩
for(score=53;score<60;score++) {
count++;
}
System.out.println("加分后成绩:"+score);
System.out.println("共加了"+count+"次");
three=one+two;
System.out.println("three = one+ two ==> "+three);
……
System.out.println("three = one+ two ==> "+three);
……
2015-03-15
public class test{
public static void main(String[] args){
double heightavg1=176.2;
int heightavg2=(int)heightavg1;
System.out.println(heightavg1);
System.out.prinln(heightavg2);
}
}
public static void main(String[] args){
double heightavg1=176.2;
int heightavg2=(int)heightavg1;
System.out.println(heightavg1);
System.out.prinln(heightavg2);
}
}
2015-03-15