diff --git a/.DS_Store b/.DS_Store index dd05b9be5..27875fa6e 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/ft.java b/ft.java new file mode 100644 index 000000000..843f4a559 --- /dev/null +++ b/ft.java @@ -0,0 +1,19 @@ +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(); +int n=0; +for(int i=0; i<r; i++) +{ +for(int j=0; j<=i; j++) +{ +System.out.print(++n+" "); +} +System.out.println(); +} +} +} \ No newline at end of file