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