fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int i,j,n;
  6. printf("enter the number of rows: \n");
  7. scanf("%d",&n);
  8. for(i=1;i<=n;i++)
  9. {
  10. printf("*");
  11.  
  12. for(j=1;j<=n;j++)
  13. {
  14. printf(" ");
  15. printf("\n");
  16. }
  17. }
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 4392KB
stdin
5
stdout
enter the number of rows: 
*