programming9
  • Flowcharts
  • Programs
      • Back
      • C Programs
      • C++ Programs
      • Java Programs
      • Python Codes
      • HTML Codes
      • Java Script Codes
      • SQL Codes
  • Tutorials
      • Back
      • Java Tutorials
      • Competitive Programming
      • Python Tutorials
      • C Programming
  • Blog
  • Login

C program to Print Triangle Pattern

Details
Written by: RajaSekhar
Category: C Programs
  • Basic C Programs-2
#include<stdio.h>
int main()
{
    int i,j,n;
    printf("enter n value");
    scanf("%d",&n);
    for(i=0; i<=n; i++)
    {
        for(j=0; j<i; j++)
            printf("%d",i);
        printf("\n");
    }
    printf("\n");
return 0; }

 OUTPUT:

enter n value5

1
22
333
4444
55555
Previous article: C Program to Find Factorial of a Number using Functions Prev Next article: C program for Fibonacci Series using do-while Loop Next
  • C Program to ADD two MATRICES
  • C Program to Implement Structure with Pointers
  • C Program to Count Total Number of Digits in a Number
  • C Program to Find Sum of Even Integers
  • C Program to Perform Arithmetic Operations Using Switch
  • C Program to find Size of Integer
  • Finding GCD and LCM of Given Numbers using C
  • C Program to Find Number of Characters and Words in a String
  • C Program for Circumference of a Circle
  • C Program to CONCATENATE Two Strings using strcat()
  • C Program to Find Sum of 5 Subjects and Percentage
  • C Program for Floyd Triangle
  • C Program to Design Lexical Analyzer
  • C Program for Arithmetic Operations using Switch Statement
  • C Program to Print Reverse of a String without strrev() function
  • Privacy Policy
  • Cookie Policy
© programming9.com 2025
Back to top