fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5.  
  6.  
  7. int i,j,k, n,count=1;
  8. printf("Enter N \n");
  9. scanf("%d",&n);
  10. for(i=1; i<=n;i++)
  11. {
  12. for(j=1;j<=n-i;j++)
  13. {
  14. printf(" ");
  15. }
  16. for(k=1;k<=count;k++)
  17. { printf("A");}
  18.  
  19. printf("\n");
  20.  
  21. count=count+2;
  22. }
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 4520KB
stdin
4
stdout
Enter N 
   A
  AAA
 AAAAA
AAAAAAA