fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int i,j,n;
  5. scanf("%d",&n);
  6. char ch='A';
  7. for(i=1;i<=n;i++){
  8. for(j=1;j<=n-i;j++){
  9. printf(" ");
  10. }
  11. for(j=1;j<=i;j++){
  12. printf("%c ",ch);
  13. ch++;
  14. }
  15. printf("\n");
  16. }
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 5320KB
stdin
5
stdout
        A 
      B C 
    D E F 
  G H I J 
K L M N O