Segitiga sama sisi mengunkan loop for di java
public class Segitiga{ public static void main(String[] args) { int n = 10; for (int i = 1;i<=n ;i++) { for (int j = n;j > i ;j-- ) { System.out.print(" "); } for (int k = 1;k <= i ;k++ ) { System.out.print("* "); } System.out.println(); } System.out.println(); } }