Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int cases = scan.nextInt();
for(int i = 0; i < cases; i++) {
String line = "";
for(int j = 0; j< cases; j++) {
if(cases-1-i > j){
line += " ";
}
else {
line += "#";
}
}
System.out.println(line);
}
}
}
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment