mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
File clean-up
This commit is contained in:
17
Misc/ft.java
Normal file
17
Misc/ft.java
Normal file
@@ -0,0 +1,17 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
|
||||
class FloydTriangle {
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.println("Enter the number of rows which you want in your Floyd Triangle: ");
|
||||
int r = sc.nextInt(), n = 0;
|
||||
|
||||
for(int i=0; i < r; i++) {
|
||||
for(int j=0; j <= i; j++) {
|
||||
System.out.print(++n + " ");
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user