Computer Science, asked by AtiyaShahab, 4 months ago

Nested Loop
* * * * *
* * * *
* * *
* *
*​

Answers

Answered by BrainlyFlash
0

\huge\fbox\pink{A}\fbox\blue{n}\fbox\purple{S}\fbox\green{w}\fbox\red{E}\fbox\orange{r}

 \\

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