int sum=age1+age2+age3+age4;
double avg=sum/4;
int minus=age1-age2;
int newAge=--age1;
double avg=sum/4;
int minus=age1-age2;
int newAge=--age1;
2015-03-26
final char SEX='男';
final char SEXL='女';
System.out.println(SEX+"\n"+SEXL);
final char SEXL='女';
System.out.println(SEX+"\n"+SEXL);
2015-03-26
public static void main(String[] args) {
int sum=0;
for (int i=1;i<101;i++){
if(i%3==0)continue;
sum+=i;
}
System.out.println(sum);
}
int sum=0;
for (int i=1;i<101;i++){
if(i%3==0)continue;
sum+=i;
}
System.out.println(sum);
}
2015-03-26