JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.util.Scanner;
/* [ CHALLENGE : ] Reverse Floyd's Triangle
*
* from Danijel Ivanović
*
* Write a program that prints
* the reverse Floyd's triangle.
* The program should ask the user
* how many rows the triangle consists of.
*
* Floyd's triangle consisting of 5 rows
* looks like this :
* 15 14 13 12 11
* 10 9 8 7
* 6 5 4
* 3 2
* 1
*
*/
class FloydTriangle{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.print("How many Rows do you want ? ");
int level = sc.nextInt();
System.out.println(level);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run