D:\liujiahao\zuoye>javac HelloWorld.javaD:\liujiahao\zuoye>java HelloWorldpublic class HelloWorld{ public static void main(String[] args){ int sum= 0; int num= 2; do{ sum =sum + num; num =num = 2; }while (num <= 50); System.out.println("50以内的偶数之和为:"+ sum); }}
添加回答
举报
0/150
提交
取消