fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i,j;
  5. for(i=1;i<=4;i++)
  6. {
  7. char ch = 'A';
  8. for(j=1;j<=7;j++)
  9. {
  10. if(j>=i && j<=8-i)
  11. {
  12. printf("%c ",ch);
  13. ch++;
  14. }
  15. else
  16. printf(" ");
  17. }
  18. printf("\n");
  19. }
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
A B C D E F G 
  A B C D E   
    A B C     
      A