Skip to content

Commit

Permalink
Merge pull request tarunsinghofficial#1106 from SUDHANSHKESHARWANI/pa…
Browse files Browse the repository at this point in the history
…tch-1

Create Alphabet_Pattern.java
  • Loading branch information
tarunsinghofficial committed Oct 31, 2020
2 parents 83f15f7 + 0f06f5c commit 5977a19
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Java_Programs_for_beginners/Alphabet_Pattern.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
public class Pattern {

public static void main(String[] args) {
char last = 'E', alphabet = 'A';

for(int i = 1; i <= (last-'A'+1); ++i) {
for(int j = 1; j <= i; ++j) {
System.out.print(alphabet + " ");
}
++alphabet;

System.out.println();
}
}
}

0 comments on commit 5977a19

Please sign in to comment.