Skip to content

Instantly share code, notes, and snippets.

@asclines
Created March 23, 2017 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asclines/765a61910478705175b694df3460d77f to your computer and use it in GitHub Desktop.
Save asclines/765a61910478705175b694df3460d77f to your computer and use it in GitHub Desktop.
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