123454321
1234 4321
123 321
12 21
1 1
Answers
The program in Java let that helps with logic to understand it program quickly.
It could use for divisional factor and use for students.
In addition, the customizable numbers are carried out with following programming codes.
123321 1 1-12 21 1212 2323, 1 1 123123 345456, 12 21 12341234 5678789, and 123321 1234512345.
Answer:
public class PatternExample{
public static void main(String[] args){
int i,j,n=5;
for(i=0;i<=n;i++)
{
System.out.println();
for(j=1;j<=n-i;j++)
System.out.print(j);
for(j=0;j<2*i;j++)
System.out.print(" ");
for(j=n-i;j>0;j--)
System.out.print(j);
}
}
}
Explanation:there must be 4 loops for this ques one for changing of rows and another for spaces,numbers in ascending order,numbers in the descending order..