Menu
×
Tutorials Ms Word Tutorial Ms Excel Tutorial Ms PowerPoint Tutorial C Language Tutorial C++ Tutorial C Sharp Tutorial Visual Basic Tutorial HTML Tutorial CSS Tutorial JavaScript Tutorial WordPress Tutorial
     ❯   

ADVERTISEMENT

Sum of All Integers

#include<stdio.h>
main()
{
 int i,j,rows,k=1;
 printf("Enter number of rows\n");
 scanf("%d",&rows);
 for(i=1;i<=rows;i++)
 {
  for(j=k;j>=1;j--)
  {
   printf("%d",j);
  }
  k++;
  printf("\n");
 }
}
C Programming Examples

OUTPUT
Enter number of rows
6
1
21
321
4321
54321
654321
C Programming Examples
Spread the love
Scroll to Top
Scroll to Top