这段代码有人能解释一下给我听吗看不太懂
package guoke;
public class ceshi163202217 {
public static void main(String []arge){
int sum =0;
int num =2;
do{
sum =sum + num;
num =num +2;
} while(num <= 5);
System.out.println(sum);
}
}
package guoke;
public class ceshi163202217 {
public static void main(String []arge){
int sum =0;
int num =2;
do{
sum =sum + num;
num =num +2;
} while(num <= 5);
System.out.println(sum);
}
}
2016-03-20
举报