Computer Science, asked by akshad52, 1 year ago

write a java program to print the following pattern 666666 55555 4444 333 22 1

Answers

Answered by saishriya2007
15
this is the answer of the question. the pattern is printed in Java programme
Attachments:

akshad52: but how to print it
Answered by stylishtamilachee
16

Answer:

import java.util.* ;

public class GenerateTriangle

{

public static void InvTriangle(int n)

{

for (int i = n ; i > = 1 ; i-- )

{

for(int j = 1 ; j < = i ; j ++ )

System.out.print(" " + i) ;

System.out.println( ) ;

}

}

}

Java :

Java is a popular third-generation programming language, which can be used to do any of the thousands of things that a computer software can do. With the features it offers, Java has become the language of choice for internet and intranet applications.

Similar questions