数组特殊格式打印{1,2,3,4,5,6}{12,23,34,45,56}{123,234,345,456}{1234,2345,3456}{12345,23456}{123456}
/*题目要求:给定一个整型数组,要求按照以下给定例子,写出打印函数。数组:arr[1]={1};打印结果:1数组:arr[2]={1,2};打印结果:1212数组:arr[3]={1,2,3};打印结果:1231223123数组:arr[4]={1,2,3,4};打印结果:12341223341232341234数组:arr[6]={1,2,3,4,5,6};打印结果:12345612233445