public class Main { public static void main(String[] args) { int count = 0; for (int i = 6; i <= 99; i += 10) { if (i % 3 == 0) { System.out.print(i + " "); count++; } } System.out.println("\n共有" + count + "个数满足条件。"); } }

为我编写一个java程序输出100以内能被3整除且个位数为6的所有整数并统计输出这些数的个数写出这个程序

原文地址: https://www.cveoy.top/t/topic/bUn6 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录