fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. char a[300][300];
  4.  
  5. int main()
  6. {
  7. int h,w,i,j;
  8. while(cin>>h>>w)
  9. {
  10. if(h==0 || w==0)
  11. break;
  12.  
  13. for(i=0;i<h;i++)
  14. {
  15. for(j=0;j<w;j++)
  16. cout<<"#";
  17. cout<<"\n";
  18. }
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 4520KB
stdin
3 4
5 6
2 2
0 0
stdout
####
####
####
######
######
######
######
######
##
##