Advertisement
LeonardoGraham

Untitled

Oct 7th, 2020
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.     int size;
  5.     char ascii;
  6.  
  7.     printf("Size of square: ");
  8.     scanf("%d", &size);
  9.     printf("Ascii character: ");
  10.     scanf(" %c", &ascii);
  11.  
  12.     printf("Square:\n\n");
  13.  
  14.     for (int i = 0; i < size; i++) {
  15.         for (int j = 0; j < size; j++) {
  16.             printf("%c", ascii);
  17.         }
  18.         printf("\n");
  19.     }
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement