Answer:
The program to this question can be given as:
Program:
public class Main //define class.
{
public static void main(String[] as) //define main method.
{
int n=5; //define variable n and assign positive value.
int i,j; //define variable
for (i = 7; i>=1; i--) //outer loop.
{
for (j = 0; j< i; j++) //inner loop.
{
System.out.print("*"); //print asterisks.
}
System.out.println(); //line break.
}
}
}
Output:
*****
****
***
**
*
Explanation:
The description of the above code can be given as: