1.使用for循环计算1-100的和,除了以3结尾的那些数1.使用for循环计算1-100的和,除了以3结尾的那些数
package zuoye; public class xiezuoye { public static void main(String[] args) { // TODO Auto-generated method stub int a=1; int sum=0; while (a<=100) { sum+=a; a++; } System.out.println("1-100和为"+sum); } }
