Computer Science, asked by vanshikajindal36, 5 months ago

d) Write the program to print the following output.
$ $ $ $ $
$ $ $ $
$$$
$$
$​

Answers

Answered by anindyaadhikari13
1

Question:-

Write a program to display the following output.

$$$$$

$$$$

$$$

$$

$

Code:-

class pattern

{

public static void main()

{

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

{

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

System.out.print("$ ");

System.out.println();

}

}

}

Similar questions