fork download
  1. #include<string>
  2. #include<iostream>
  3. #define f(w,h,C,W,H){std::string s(w,W),t;s=C+s+C+"\n";for(int i=h;i--;)t=t+H+"\n";std::cout<<s+t+s+t+s;}
  4.  
  5. int main() {
  6. f(4,2,'+','-','|')
  7. f(2,1,'@','#','i')
  8. return 0;
  9. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
+----+
|
|
+----+
|
|
+----+
@##@
i
@##@
i
@##@