Skip to content

Instantly share code, notes, and snippets.

@nitishk72
Created October 17, 2017 05:53
Show Gist options
  • Save nitishk72/8821ac9686cdc41cbf56fb558c75c0d4 to your computer and use it in GitHub Desktop.
Save nitishk72/8821ac9686cdc41cbf56fb558c75c0d4 to your computer and use it in GitHub Desktop.
public class MagicTriqngle
{
public static void main(String[] args)
{
String s= "ABRACADABRA";
for (int i = s.length(); i > 0; i --) {
for(int u = 0;u<s.length()-i;u++)
System.out.print(" ");
for (int j = 0; j < i; j ++)
System.out.print(s.charAt(j)+" ");
System.out.println();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment