1
21
3 2 1
4 3 2 1
5 4 3 2 1
4321
321
21
1
WRITE A JAVA PROGRAM. ....
WRITE A PATTERN PROGRAM....
WRONG ANSWER WILL BE REPORTED
Attachments:
Answers
Answered by
4
Answer:
Note:-Hey dear such type of Questions are to be divided into two parts so it became easier to solve more easily and without Compile time error..........
Therefore let start the program.....
________________________
Attachments:
Answered by
2
class Pattern
{
public static void main(String[] args)
{
for (int i = 1; i <= 5; i++)
{
for (int j = i; j >= 1; j--)
{
System.out.print(j + " ");
}
}
for(int c = 5;c >= 1;c--)
{
for (int d = c;d > 0;d--)
{
System.out.print(d);
}
System .out.println();
}
}
}
Similar questions