Computer Science, asked by S4yni, 11 months ago

Help! I have an exam in 2 hours! Anybody! Please!

Attachments:

Answers

Answered by ramesh84menaria
0

I don't know this program JAVA

sorry bro

Answered by SibinPaul
0

Answer:

. Right Triangle Star Pattern

*

* *

* * *

* * * *

* * * * *

1. public class Edureka

2. {

3. public static void rightTriangle(int n)

4. {

5. int i, j;

6. for(i=0; i<n; i++) //outer loop for 7. number of rows(n) { for(j=2*(n-i); j>=0; j--) // inner loop for spaces

8. {

9. System.out.print(" "); // printing space

10. }

11. for(j=0; j<=i; j++) // inner loop for columns

12. {

System.out.print("* "); // print star

13. }

System.out.println(); // ending line after each row

14. }

15. }

public static void main(String args[])

16. {

17. int n = 5;

18. rightTriangle(n);

19. }

20. }

Mark it as Brainliest answer

Similar questions