Breaking

Thursday 3 January 2019

Program to print half pyramid using Abstric Sign | Pettern Program


C Programming Code To Create Pyramid and Pattern



Guides to print half pyramid, pyramid, upset pyramid, Pascal's Triangle and Floyd's triangle in C Programming utilizing control explanations.


Example programs in C dialect: These projects print different examples of numbers and stars. These codes outline how to make different examples utilizing C programming. The C programs include use of settled for circles (a for circle inside a for circle). An example of numbers, star or characters is a method for organizing these in some legitimate way or they may frame a succession. A portion of these examples are triangles which have uncommon significance in arithmetic. A few examples are symmetrical while others are definitely not. If it's not too much trouble see the entire page and take a gander at remarks for a wide range of examples.

To comprehend this precedent, you ought to have the learning of following C programming subjects:
  • C if...else Statement
  • C Programming for Loop
  • C Programming while and do...while Loop
  • C Programming break and continue Statement


Programs to print triangles using Abstric Sign, Digits and Characters.


Pro.1: Program to print half pyramid using Abstric Sign.

Program Code

#include <stdio.h>
int main()
{
    int i, j, rows;

    printf("Enter number of rows: ");
    scanf("%d",&rows);

    for(i=1; i<=rows; ++i)
    {
        for(j=1; j<=i; ++j)
        {
            printf("* ");
        }
        printf("\n");
    }
    return 0;
}


 

OutPut :-
 

No comments:

Post a Comment