Nested Loop
* * * * *
* * * *
* * *
* *
*
Answers
Answered by
0
import java.util.Scanner;
public class stars
{
public static void main(String[ ] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter number of rows: ");
for (int i= 5 ; i > 0; i --)
{
for (int j=0; j<=i; j++)
{
System.out.print("*" + " ");
}
System.out.println();
}
}
}
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Hope it's help ⚓⚓
Please mark me as brainliest (◠‿◕)
Similar questions