Advertisement
Dido09

C - NumberPyramid

May 25th, 2022
549
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement