Created
September 5, 2017 07:05
-
-
Save hyperion0201/58ec4d5ea560b289691ae991f47ba526 to your computer and use it in GitHub Desktop.
Right-Angled Triangle create by a num.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
//import javax.swing.*; | |
class Square{ | |
public static void main(String[] args) { | |
Scanner scan = new Scanner(System.in); | |
System.out.println("Nhap vao so n : "); | |
int n = scan.nextInt(); | |
for (int i = 0; i <= n; i++) { | |
for (int j = i; j<=(n-1); j++ ) { | |
System.out.print("*"); | |
} | |
System.out.print("\n"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment