您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

JAVA怎么输出5个数换一行4个数 你学会了吗?

2023/10/4 3:08:35发布36次查看
1、java输出5个数换一行4个数的编程如下:public class 类名(自己定义) {public static void main(string[] args) {// todo auto-generated method stubsystem.out.print( +2+ +3+ +5+ +7);
2、int c=4;for(int n=2;n<=100;n++){if((n%2==0)||(n%3==0)||(n%5==0)||(n%7==0)){continue; }else{
3、c++; system.out.print( +n);if(c%5==0)system.out.print(\n);} } } }。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product