C Program to Print Half Pyramid Using Alphabet

In this program we will print half pyramid pattern using Alphabet

  1. //C program to print half alphabet pyramid
  2. #include <stdio.h>
  3. int main()
  4. {
  5. int i, j;
  6. char inpt, alpbet = 'A';
  7. printf("Enter the uppercase character you want to print in last row: ");
  8. scanf("%c",&inpt);
  9. for(i=1; i <= (inpt-'A'+1); ++i)
  10. {
  11. for(j=1;j<=i;++j)
  12. {
  13. printf("%c", alpbet);
  14. }
  15. ++alpbet;
  16. printf("\n");
  17. }
  18. return 0;
  19. }

Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]

Join Our Facebook Group

Share this example

Download Android App

download android app

Popular C Examples


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube