第二个for循环中的if(k==1 || k<=2i-1 ||k==5)肯定有问题啊,k<=2i-1一直是成立的,所以根本不会输出空格。应该是k==2*i-1吧
瞅瞅呢https://blog.csdn.net/kengkeng123qwe/article/details/124472847