Star Pattern Series 1 - Triangle pyramid pattern in C programming language using stars

1 min read
Share this
Table Of Content

In This Program, We will see the Right Angle Triangle pyramid pattern or half triangle pattern in C programming language using stars.

Copy
*
**
***
****
*****

The C program for the above right angle triangle pyramid pattern or half triangle pattern is as follows:

Copy
#include<stdio.h>

int main() {
    int i, j, noRows;
    printf("Enter number of rows for pattern = ");
    scanf("%d",&noRows);
    for(i=0; i< noRows; i++) {
        for(j=0;j<=i;j++) {
            printf("*");
        }
        printf("\n");
    }
    return 0;
}

Output

Copy
Enter number of rows for pattern = 5

*
**
***
****
*****
0 Comments
Related Tutorials
Related Recommended Videos

Yubikey - The Ultimate Beginner Guide (How to Setup & Use)

The YubiKey is a hardware authentication device manufactured by Yubico to protect access to computers, networks, and online services that supports one-time passwords, public-key cryptography, and authentication, and the Universal 2nd Factor and FIDO2 protocols developed by the FIDO Alliance.

AUTHENTICATIONCRYPTOGRAPHYHARDWARESECURITYYOUTUBE

Master Flutter in Just 8 Hours | Full Course Hindi

Learn Flutter from basics to advanced in just 8+ hours. This covers everything related to UI, Data, Model, API, State Management, Navigator 2.0 and more.

ANDROIDANIMATED CONTAINERAPP BAR THEMEBUILD CONTEXTCARD

Flutter Master Class Travel App | Flutter 3.13.0 for Beginners to Advanced | iOS & Android Cubit

From this tutorial we build a flutter cubit / bloc state management app. We will build it step by step. We will also build the ui and do api request. We will cover http get request and load the data using flutter cubit or bloc. We will also see how to use bloc-provider and bloc-builder for state update. This covers building the model and API request. (not speed code, not the flutter way). So this is a travel app. It's also very beginners friendly app.

ANDROIDBLOCBLOC BUILDERBLOC CONSUMERBLOC LISTENER

Docker Tutorial for Beginners

Docker Tutorial for Beginners - Learn Docker for a career in software or DevOps engineering. This Docker tutorial teaches you everything you need to get started.

BEGINNERSDEV OPSDEVELOPMENTDOCKERPROGRAMMING LANGUAGE