package com.oneProject;
/*
题目:
1、求1~100的累加值。
2、跳过所有个位是3的数
*/
public class Test12 {
public static void main(String[] args) {
System.out.println(“开始执行”);
int c = sum1(1,100);
System.out.println©;
}
public static int sum1(int a,int b) {
int sum = 0;
for (int i = a; i <= b; i++) {
if (i % 10 == 3 || i == 3) {
continue;
}
sum = sum + i;
}
return sum;
}
}