Created
October 17, 2017 05:53
-
-
Save nitishk72/8821ac9686cdc41cbf56fb558c75c0d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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