coderrohan14

LoopingQues2.java

Jun 27th, 2021
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Solution {
  4. public static void main(String[] args) {
  5. Scanner sc = new Scanner(System.in);
  6. int n = sc.nextInt();
  7. for(int i=1;i<=n;i++){
  8. for(char a = (char)('A'+(n-i));a<=(char)('A'+n-1);a++){
  9. System.out.print(a);
  10. }
  11. System.out.println();
  12. }
  13. }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment