diff --git a/Patterns/spacepattern.java b/Patterns/spacepattern.java new file mode 100644 index 0000000..40738f4 --- /dev/null +++ b/Patterns/spacepattern.java @@ -0,0 +1,34 @@ +public class space_alphabet +{ + public static void main(String args[]) + { + int i,j,k,m; + int sp=-1; + for(i=69;i>=65;i--) + { + for(j=65;j<=i;j++) + { + System.out.print((char)j); + } + for(k=1;k<=sp;k++) + { + System.out.print(" "); + } + if(i==69) + { + m=i-1; + } + else + { + m=i; + } + for(j=m;j>=65;j--) + { + System.out.print((char)j); + } + System.out.println(); + sp=sp+2; + } + } +} +