Number Pattern Left Triangle in C Programming

By | June 20, 2019

“Number Pattern Left Triangle in C Programming” is a C program to display a number pattern triangle as shown in the figure.

"Number Pattern Left Triangle in C Programming" is a C program to display a number pattern triangle as shown in the figure.

“Number Pattern Left Triangle in C Programming” is a C program to display a number pattern triangle as shown in the figure.

Source code for this Number pattern left triangle

 

/*
Write a program to print number pattern
triangle in c programming language as shown below

   1
   12
   123
   1234
   12345

*/
#include<stdio.h>  
int main()   
{   
  int row, col;  
  for( row = 1; row <= 5;row++)
  {
  	for(col=1; col<=row; col++)
	   printf("%d",col);   
  	printf("\n");
  }
  return 0;
}

  
  

This is an image showing sample run and output of number pattern left triangle program in c programming.

This is an image showing sample run and output of number pattern left triangle program in c programming.

This is an image showing sample run and output of number pattern left triangle program in c programming.

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *