Advertisement
Dido09

C - NumberPyramid

May 25th, 2022
722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4.  
  5. int main()
  6. {
  7.     int num, i, j;
  8.     printf("Enter a number: ");
  9.     scanf("%d", &num);
  10.  
  11.     for(i = 1; i <= num; i++){
  12.         for(j = 1; j <= i; j++){
  13.             printf("%d", num);
  14.         }
  15.              printf("\n");
  16.     }
  17.  
  18.  
  19.  
  20.     return 0;
  21.  
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement