java小程序,帮个忙,谢谢^_^

2024-12-23 15:01:46
推荐回答(1个)
回答1:

7 14 21 35 42 49
63 70 77 91 98 105
119 126 133 147 154 161
175 182 189

public class Test
{
public static void main (String[] args)
{
int n = 0;
for (int i = 0; i < 200; i += 7)
if (i % 4 != 0)
{
n++;
System.out.print (i + " ");
if (n % 6 == 0)
System.out.println ();
}
}
}