0
Can u explain how the output is processed
public class Pat { public static void main(String[] args) { int rows=4,num=1,i,j,k,s=2,t=1,u=2,space=3,v=3,z=0; for(i=1;i<=rows;i++){ for(k=0;k<=space;k++){ System.out.print(" "); }for(j=1;j<=(i*2)-1;j++){ if(i==s&&j==t){ s++;t++;continue; }if(i==u&j==v){ System.out.print(((num)+(num-1))*z+" "); u++; v++; }System.out.print(num); num++; }System.out.println(); z+=3;space=space-1; } }}
1 ответ
0
can, but rather you try a more meaningful code