Write Two Separate Programs to Generate the Following Patterns Using Iteration (Loop) Statement:
Advertisements
प्रश्न
Write two separate programs to generate the following patterns using iteration (loop) statement:
(b)

टीपा लिहा
Advertisements
उत्तर
public class pattern 2
{
public static void main( )
{
for(int i=1 ; i<=5 ; i++)
{
for(int j=5; j>=i; j--)
{
System.out.print(j);
}
System.out,println( );
}
}
}
shaalaa.com
Introduction of Iterative Constructs in Java
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
