Advertisement
Sabbir-bin

number_pyramid

Dec 6th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int i, j, rows;
  5.     printf("Enter number of rows: ");
  6.     scanf("%d",&rows);
  7.     for(i=1; i<=rows; ++i)
  8.     {
  9.         for(j=1; j<=i; ++j)
  10.         {
  11.             //printf("* ");
  12.             printf("%d\t",j);
  13.         }
  14.         printf("\n");
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement