Thursday, December 24, 2024

C Program to Print the Pattern of Pyramid


Write a Program to Print the Following Pattern

Program :

  1. #include<stdio.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. char ch='*';                      // Assign ' * ' to the Character Variable
  6. int i , j ;                         // i for Counting lines , j for counting stars in Line
  7. for( i = 0 ; i < 4 ; i++ )
  8. {
  9. printf("\n");
  10.     for ( j = 0; j < i ; j ++ )
  11.            printf("%c\t",ch);
  12. }
  13. getch();
  14. }


Bookmark & Share

0 comments:

Post a Comment

Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email

Copyright Notice | Link Exchange | Privacy Policy |Contact Us

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls