Star Pattern Series 2 - 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=no_rows; i>=0; i--) {
      for(j=0;j<=i;j++) {
          printf("*");
      }
      printf("\n");
    }
    return 0;

Result:

Copy
Enter number of rows for pattern = 5

*****
****
***
**
*
Related Blogs
Unlocking Flutter's Potential: Best Practices for Writing Clean Code

Unlocking Flutter's Potential: Best Practices for Writing Clean Code

Unlock Flutter's potential with clean code! Learn best practices for writing maintainable Dart code in Flutter. Explore examples and essential principles for code quality.

Clean CodeCode Best PracticesCode MaintainabilityCode OrganizationCode Readability

June 02, 2023

Top 9 Local Databases for Flutter in 2023: A Comprehensive Comparison

Top 9 Local Databases for Flutter in 2023: A Comprehensive Comparison

Looking for the best local database for your Flutter app? Check out our comprehensive comparison of the top 9 local databases for Flutter in 2023.

CodingFlutterFlutter Local DatabasesLearn To CodeNosql

April 06, 2023

Related Tutorials
How to Show Automatic Internet Connection Offline Message in Flutter

How to Show Automatic Internet Connection Offline Message in Flutter

You have to use the 'Connectivity Flutter Package' to achieve this feature on your App. This package helps to know whether your device is online or offline.

Connectivity PlusDependenciesFlutterFlutter DevelopmentFlutter Packages

April 09, 2024

Mastering TabBar and TabBarView Implementation in Flutter: A Comprehensive Guide for 2023

Mastering TabBar and TabBarView Implementation in Flutter: A Comprehensive Guide for 2023

Discover the art of implementing TabBar and TabBarView widgets in Flutter with our comprehensive guide for 2023. Learn step by step how to create captivating user interfaces, customize tab indicators, enable scrollable tabs, change tabs programmatically, and more. Elevate your Flutter app's navigation and user experience with expert insights and practical examples.

CodingDefault Tab ControllerFlutterLearn To CodeTab Controller

July 26, 2023

Enhancing File Manipulation in Flutter: Best Practices and Examples

Enhancing File Manipulation in Flutter: Best Practices and Examples

Master Flutter file manipulation like a pro. Our comprehensive blog provides insights on permission management, directory handling, and practical read-write scenarios. Elevate your app's file management.

CodingFlutterFlutter DevelopmentFlutter File OperationFlutter Path Provider

June 30, 2023

Your Adventure in Appland: Crafting a 'Hello World' App with Flutter in 2023

Your Adventure in Appland: Crafting a 'Hello World' App with Flutter in 2023

Embark on a magical journey into app development! Craft your own Hello World app with Flutter in 2023, step by step. Let the coding adventures begin!

CodingFlutterFlutter DevelopmentHello WorldLearn To Code

June 14, 2023

Related Recommended Services
Visual Studio Code for the Web

Visual Studio Code for the Web

Build with Visual Studio Code, anywhere, anytime, in your browser.

idevisual-studiovisual-studio-codevscodeweb
Renovate | Automated Dependency Updates

Renovate | Automated Dependency Updates

Renovate Bot keeps source code dependencies up-to-date using automated Pull Requests.

automated-dependency-updatesbundlercomposergithubgo-modules
Kubecost | Kubernetes cost monitoring and management

Kubecost | Kubernetes cost monitoring and management

Kubecost started in early 2019 as an open-source tool to give developers visibility into Kubernetes spend. We maintain a deep commitment to building and supporting dedicated solutions for the open source community.

cloudkubecostkubernetesopen-sourceself-hosted
Related Recommended Stories
Awesome Python

Awesome Python

An opinionated list of awesome Python frameworks, libraries, software and resources

awesomecollectionsgithubpythonpython-framework
Found means fixed - Introducing code scanning autofix, powered by GitHub Copilot and CodeQL

Found means fixed - Introducing code scanning autofix, powered by GitHub Copilot and CodeQL

Now in public beta for GitHub Advanced Security customers, code scanning autofix helps developers remediate more than two-thirds of supported alerts with little or no editing.

code-scanningcodeqlcodinggithubgithub-advanced-security
Awesome Java

Awesome Java

A curated list of awesome frameworks, libraries and software for the Java programming language

awesomebuildcachingclicode-analysis
Awesome iOS

Awesome iOS

A curated list of awesome iOS ecosystem, including Objective-C and Swift Projects

analyticsapp-routingapp-storeapple-swiftapple-tv