give the program of Java the program is 4321,321,21,1
Answers
Answered by
17
your program for this pattern is
public class Program
{
public static void main(String[] args) {
for(int i=4;i>=1;i--){
for(int j=i;j>=1;j--){
System.out.print(j);}
System.out.println();}
}
}
public class Program
{
public static void main(String[] args) {
for(int i=4;i>=1;i--){
for(int j=i;j>=1;j--){
System.out.print(j);}
System.out.println();}
}
}
Answered by
10
class Pattern
{
public static void main(String args[])
{
int i,j;
for(i=4;i>=1;i--)
{
for(j=i;j>=1;j--)
{
System.out.print(j+" ");
}
System.out.println("");
}
}
}
Mark me brainlest@
For more java doubts follow me.
Similar questions