package zrs;
public class javaDay03_2 {
public static void main(String[] args) {
//for循环
int sum=0;
for(int x=1;x<=10;x++) {
sum=sum+x;
}
System.out.println("sum="+sum);
//求1-100之间6的倍数的数,并统计出总共有多少个?
int count=0;
for(int x=1;x<=100;x++) {
if(x%6==0) {
System.out.println(x+"是6的倍数:");
count++;
}
}
System.out.println("100以内6的倍数的个数总共有"+count+"个");
}
}