[Question]
  [
Your task is to display the below letter "E" shaped ASCII art, given five inputs.
Examples:
Input: `7,2,+,|,-` (Note: You don't have to follow this exact input format, and if you don't use it, then you must explain how your own input format works)
Explanation:
* `7` *total width, including the left and right edge characters.*
* `2` *Number of vertical characters.*
* `+` *The character that should display at the edges.*
* `|` *The character that should display vertically between the edges.*
* `-` *The character that should display horizontally.*
Output of the above example:
```
+-----+ 
|
|
+-----+
|
|
+-----+
```
---
---
Other examples:
Input: `7,2,@,|,-`
Output:
```
@-----@
|
|
@-----@
|
|
@-----@
```
---
---
Input: `7,2,+,|,#`
Output:
```
+#####+
|
|
+#####+
|
|
+#####+
```
---
---
Input: `8,3,+,|,#`
Output:
```
+######+
|
|
|
+######+
|
|
|
+######+
```
---
---
Input: `8,3,+,@,#`
Output:
```
+######+
@
@
@
+######+
@
@
@
+######+
```
---
---
Input: `9,4,^,$,!`
Output:
```
^!!!!!!!^
$
$
$
$
^!!!!!!!^
$
$
$
$
^!!!!!!!^
```
---
---
Cheating and standard loopholes are not allowed.
Your code must not print anything to STDERR.
Your code may accept any character encoding you choose as the input, but any character encoding you choose must, as a minimum, support [all the 95 printable ASCII characters.](http://www.theasciicode.com.ar/ascii-printable-characters/underscore-understrike-underbar-low-line-ascii-code-95.html)
The shortest code, in bytes, that completes this challenge successfully, is the winning code.
### Leaderboard
```
var QUESTION_ID=92138,OVERRIDE_USER=58717;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
```
```
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
```
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table>
```
  
[Answer]
# [05AB1E](http://github.com/Adriandmen/05AB1E), ~~16~~ 14 bytes
```
Í×s.ø©|`×`»D®»
```
**Explanation**
```
Í×                  # create a string of the correct nr of horizontal chars
  s.ø               # add the corner char on both sides
     ©              # save in register while keeping it on the stack
      |`            # push the remaining inputs to the top of the stack
        ×`          # push the correct nr of vertical chars on the stack
          »         # join on newline (joining the top vertical and horizontal sections)
           D        # duplicate this
            ®       # push the horizontal part again
             »      # join everything on newline
```
[Try it online!](http://05ab1e.tryitonline.net/#code=w43Dl3Muw7jCqXxgw5dgwrtEwq7Cuw&input=NwotCisKMgp8)
Saved 4 bytes thanks to Adnan.
[Answer]
# Python, ~~53~~ ~~51~~ 55 Bytes
```
lambda a,b,c,d,e:d.join("\n"*-~b).join([c+e*(a-2)+c]*3)
```
*+4 Bytes thanks to @nimi*
anonymous lambda function, to call it, write `f=` before it. Example:
```
>>> print f(4,1,"€","|","-")
€--€
|
€--€
|
€--€
```
## alternative, 53 Bytes
```
lambda a,b,c,d,e:((c+e*a+c+"\n"+(d+"\n")*b)*3)[:-b*2]
```
## old version with the special case of no input, ~~69~~ ~~65~~ 63 Bytes
yay to changing the requirements mid-challenge...
```
lambda a=1,b=1,(c,d,e)="+|-":d.join("\n"*-~b).join([c+e*a+c]*3)
```
[Answer]
# C, ~~167~~ ~~161~~ 159 bytes
Yeah.
```
#define p putchar
i,j;g(a,c,e){p(c);for(i=2;i++<a;)p(e);p(c);p(10);}h(b,d){for(i=0;i++<b;){p(d);p(10);}}f(a,b,c,d,e){g(a,c,e);h(b,d);g(a,c,e);h(b,d);g(a,c,e);}
```
[Try it on Ideone, with some test cases](https://ideone.com/VpcAY6)
[Answer]
# Ruby, ~~54~~ ~~45~~ 42 bytes
```
->x,y,c,v,h{[c+h*~-~-x+c+$/]*3*((v+$/)*y)}
```
It's an anonymous function that takes the different part of the input as separate parameters and returns the result as a complete string.
For example,
```
f=->x,y,c,v,h{[c+h*~-~-x+c+$/]*3*((v+$/)*y)}
puts f[6, 2, 'Ø', 'V', '>']
```
prints 
```
Ø>>>>Ø
V
V
Ø>>>>Ø
V
V
Ø>>>>Ø
```
[Answer]
## Javascript (ES6), 64 bytes
```
(h,v,e,V,H)=>(v=(h=e+H.repeat(h-2)+e)+`
${V}`.repeat(v)+`
`)+v+h
```
### Example
```
let f =
(h,v,e,V,H)=>(v=(h=e+H.repeat(h-2)+e)+`
${V}`.repeat(v)+`
`)+v+h
console.log(f(8,3,'+','@','#'))
```
[Answer]
# [V](http://github.com/DJMcMayhem/V), 18 bytes
```
älJxxÀPjddÀpkäGYGp
```
[Try it online!](http://v.tryitonline.net/#code=w6RsSnh4w4BQamRkw4Bwa8OkR1lHcA&input=QAotCnw&args=NQ+NQ)
[Answer]
# R, 80 bytes
Pretty repetitive :
```
function(h,v,a,b,c)cat(t<-c(a,rep(c,h),a,"\n"),d<-rep(c(b,"\n"),v),t,d,t,sep="")
```
**Ungolfed :**
```
function(h,v,a,b,c)
cat(t<-c(a,rep(c,h),a,"\n"),
    d<-rep(c(b,"\n"),v),
    t,d,t,
    sep="")
```
[Answer]
## Pyke, ~~16~~ 15 bytes
```
*2mtz:zn+Q*' +D
```
[Try it here!](http://pyke.catbus.co.uk/?code=%2a2mtz%3Azn%2BQ%2a%27+%2BD&input=3%0A8%0A%23%0A%2B%0A%7C)
[Answer]
# Pyth, 19 bytes
```
jP*3,++Jw*-E2wJj*Ew
```
A program that takes newline-separated input on STDIN of the corner character, number of horizontal characters, horizontal character, number of vertical characters and the vertical character, and prints the result.
[Try it online](https://pyth.herokuapp.com/?code=jP%2a3%2C%2B%2BJw%2a-E2wJj%2aEw&test_suite=1&test_suite_input=%2B%0A7%0A-%0A2%0A%7C%0A%40%0A7%0A-%0A2%0A%7C%0A%2B%0A7%0A%23%0A2%0A%7C%0A%2B%0A8%0A%23%0A3%0A%7C%0A%2B%0A8%0A%23%0A3%0A%40%0A%5E%0A9%0A%21%0A4%0A%24&debug=0&input_size=5)
**How it works**
```
jP*3,++Jw*-E2wJj*Ew  Program.
       Jw            Get the corner character. Store in J
           E         Get the number of horizontal characters
          - 2        -2
         *   w       Get the horizontal character and repeat it that many times
      +              Add J at the beginning of that
     +         J     and at the end
                 E   Get the number of vertical characters
                * w  Get the vertical character and repeat it that many times
               j     Join the above on newlines
    ,                Construct a 2-element list from the horizontal and vertical strings
  *3                 Repeat it 3 times
 P                   Everything except the last element
j                    Join the above on newlines
                     Implicitly print
```
[Answer]
# MATLAB, ~~95 92 91 85~~ 81 bytes
MATLAB 'E' function. (edit: doesn't work on Octave)
```
function a=e(n,m,c,h,v);a(1:n)=h;a=[c a c];a(2:m+1,1)=v;a=[a;a;a];a=a(1:3+2*m,:);
```
And ungolfed:
```
function a=e(n,m,c,h,v); %Declare the function
a(1:n)=h;                %Initialise return with top line excluding the corners
a=[c a c];               %Then add corner pieces
a(2:m+1,1)=v;            %Next add the first vertical part
a=[a;a;a];               %Repeat three times vertically to get an E with a tail
a=a(1:3+2*m,:);          %And then lop off the tail
```
The function should be called like:
```
e(5,2,'*','-','|')
```
Which will return:
```
+-----+
|      
|      
+-----+
|      
|      
+-----+
```
This can probably be simplified a bit, I'll keep working on it. I don't like having the entire function declaration to get the input, so will see if I can improve that.
---
* Saved 3 bytes by simplifying generation of first line to first make the line without corners and then add the corners as this reduces the number of times indexing is required.
* Another byte saved by starting with the first corner.
* 6 more bytes by replacing `repmat(a,3,1)` call with `[a;a;a]`.
* Saved 4 bytes by using `a` without specific initialisation (it's already declared in the function declaration) - thanks @LuisMendo
[Answer]
## Perl, 40 + 1 (`-n`) = 41 bytes
*Thanks to [@Ton Hospel](https://codegolf.stackexchange.com/users/51507/ton-hospel) for saving 14 bytes and allowing the program to work with entry greater than 10.*
```
/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3
```
Need `-n` as well as `-E` (or `-M5.010`) to run.
For instance :
```
perl -nE '/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3' <<< '^$
!
4
9'
```
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), ~~31~~ 29 [bytes](http://meta.codegolf.stackexchange.com/a/9429/43319)
Prompts for horizontal-character, width, junction-character, height, vertical-character – in that order.
```
h↓⊃⍪/3/⊂↑(⍞⍴⍨h←⎕),⊂⍞{∊⍺⍵⍺}⎕⍴⍞
```
`⎕⍴⍞` input-horizontal-character and repeat input-width times (**⍵** below)
`⍞{`...`}` input-junction-character which will be **⍺** in the function...
 `∊⍺⍵⍺` flatten [[junction],[horizontals],[junction]]
`⊂` encapsulate so it can be part of a list
`(`...`),` prepend...
 `h←⎕` input-height
 `⍞⍴⍨` input-vertical-character and repeat it that many times
`↑` make the list of strings into a character table
`⊂` encapsulate (so it can be repeated as a whole)
`3/` repeat it three times
```
╻  ╻  ╻
┗━ ┗━ ┗━
```
`⍪/` concatenate the three pieces vertically  
```
╻
┣━
┣━
┗━
```
(this encapsulates them too, so we need to...)
`⊃` remove the encapsulation
`h↓` drop the first **h** (rows)
```
┏━
┣━
┗━
```
[TryAPL online!](http://tryapl.org/?a=H%20w%20J%20h%20V%20%u2190%20%27-%27%205%20%27+%27%202%20%27%7C%27%20%u22C4%20h%u2193%u2283%u236A/3/%u2282%u2191%28V%u2374%u2368h%u2190h%29%2C%u2282J%7B%u220A%u237A%u2375%u237A%7Dw%u2374H&run)
[Answer]
## C, 130 bytes
```
#define p putchar
#define E for(o=0;o++<O;p(10))p(S);
#define W for(p(P),D=0;D++<C-2;)p(_);p(P);p(10);
f(C,O,P,S,_,D,o){W E W E W}
```
### Usage:
```
main(){f(7,2,'+','|','-');}
```
**Output**
```
+-----+
|
|
+-----+
|
|
+-----+
```
[Answer]
# C#, 108 bytes
```
(m,n,e,v,h)=>{string x=e+new string(h,m-2)+e+"\n",y=new string(v,n).Replace(v+"",v+"\n");return x+y+x+y+x;};
```
Anonymous function which generates each horizontal and vertical line and builds the final output.
Ungolfed function:
```
(m,n,e,v,h)=>
{
    string x = e + new string(h, m - 2) + e + "\n",
        y = new string(v, n).Replace(v + "", v + "\n");
    return x + y + x + y + x;
};
```
Full program with test cases:
```
using System;
namespace LetterEWithoutE
{
    class Program
    {
        static void Main(string[] args)
        {
            Func<int,int,char,char,char,string>f= (m,n,e,v,h)=>{string x=e+new string(h,m-2)+e+"\n",y=new string(v,n).Replace(v+"",v+"\n");return x+y+x+y+x;};
        
            Console.WriteLine(f(7,2,'+','|','-'));
            Console.WriteLine(f(7,2,'@','|','-'));
            Console.WriteLine(f(7,2,'@','|','#'));
            Console.WriteLine(f(8,3,'+','|','#'));
            Console.WriteLine(f(8,3,'+','@','#'));
            Console.WriteLine(f(9,4,'^','$','!'));
        }
    }
}
```
[Answer]
# [MATL](http://github.com/lmendo/MATL), 15 bytes
*Thanks to @muddyfish for a correction*
```
2-Y"yv!iiY"!yyy
```
[Try it online!](http://matl.tryitonline.net/#code=Mi1ZInl2IWlpWSIheXl5&input=NwonLScKJysnCid8Jwoy)
### Explanation
The stack contents after each step are indicated for clarity, using the first example in the challenge.
```
2-    % Implicitly input number of repetitions of the char of the horizontal line.
      % Subtract 2
      %   STACK: 5
Y"    % Implicitly input char of the horizontal line. Apply run-length decoding
      %   STACK: '-----' (string)
y     % Implicitly input (from below) the char of the corners. Duplicate onto the top
      %   STACK: '+', '-----', '+'
v!    % Concatenate all the stack horizontally. We now have the horizontal line
      % including the corners
      %   STACK: '+-----+'
iiY"  % Take two inputs: char of the vertical line and number of repetitions
      %   STACK: '+-----+', '||'
!     % Transpose. This tranforms the string into a vertical char array, which
      % gives the vertical line
      %   STACK: '+-----+', ['|';'|'] (vertical char array)
y     % Duplicate from below: this pushes a new copy of the horizontal line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+'
y     % Duplicate from below: this pushes a new copy of the vertical line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+', ['|';'|'],
y     % Duplicate from below: this pushes a new copy of the horizontal line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+', ['|';'|'], '+-----+'
      % Implicitly display
```
[Answer]
# Java 7, ~~205~~ 129 bytes
```
String c(int w,int h,String a,char b,char c){String r=a,n="\n",l="";for(;w-->2;r+=c);r+=a+n;for(;h-->0;l+=b+n);return r+l+r+l+r;}
```
*-76 bytes thanks to an anonymous stranger.  
PS: Don't go edit other people's posts next time. If you have something to golf please leave it as a comment, or if it's using a completely different approach you could make your own answer. Still thanks for golfing away all these bytes, though - whoever you are..*
**Ungolfed & test cases:**
[Try it here.](https://ideone.com/VhFOmi)
```
class M {
    static String c(int w, int h, String a, char b, char c){
        String r = a,
               n = "\n",
               l = "";
        for(; w-- > 2; r += c);
        r += a+n;
        for( ;h-- > 0; l += b+n);
        return r+l+r+l+r;
    }
 
    public static void main(String[] a) {
        System.out.print(c(7, 2, "+", '|', '-'));
        System.out.print(c(9, 4, "?", '¡', '¿'));
    }
}
```
**Output:**
```
+-----+
|    
|    
+-----+
|    
|    
+-----+
?¿¿¿¿¿¿¿?
¡      
¡      
¡      
¡      
?¿¿¿¿¿¿¿?
¡      
¡      
¡      
¡      
?¿¿¿¿¿¿¿?
```
[Answer]
# Bash + coreutils, 105 bytes
```
printf -- "$3`printf -- "$4%.0s" $(seq $1)`$3`printf "\n$5%.0s" $(seq $2)`%.0s\n" {1..3}|sed -n 1,$(($2*2+3))p
```
Assuming the file within which this is stored is named `A.sh`, the usage would be:
```
bash A.sh <Horizontal Segment Length w/out Edge Chars> <Vertical Segment Length> '<Left/Right Edge Char>' '<Char Between Edges>' '<Vertical Char>'
```
The `--` are needed, just in case one of the character inputs happens to be a `-`, and `printf` apparently doesn't handle dashes in the beginning of a string very nice without the double-dashes. 
## Explanation
Assuming that the input is `5 2 + * |`...
1. `$3`printf -- "$4%.0s" $(seq $1)`$3`printf "\n$5%.0s" $(seq $2)``
Create the first horizontal segment and vertical segment all together. This would result in:
```
+*****+
|
|
```
2. `printf -- "$3`printf -- "$4%.0s" $(seq $1)`$3`printf "\n$5%.0s" $(seq $2)`%.0s\n" {1..3}` 
Repeat the previously created part `3` times over. This now results in:
```
+*****+
|
|
+*****+
|
|
+*****+
|
|
```
3. `printf -- "$3`printf -- "$4%.0s" $(seq $1)`$3`printf "\n$5%.0s" $(seq $2)`%.0s\n" {1..3}|sed -n 1,$(($2*2+3))p`
Finally pipe the previous output to `sed` to get rid of the last 2 line segments by only outputting the first `<Vertical Segment Length>*2+3` lines of the `E`. We finally get the `E` we want: 
```
+*****+
|
|
+*****+
|
|
+*****+
```
[Answer]
## PowerShell v2+, ~~60~~ 59 bytes
```
param($a,$b,$c,$d,$e)(,($x="$c$($e*($a-2))$c")+,$d*$b)*2;$x
```
Takes input as individual command-line arguments. Constructs the horizontal string, stores that into `$x` for use later, then forms that into an array with the comma-operator `,`. Performs array concatenation (i.e., adding elements to the end) of `$d` formulated into an array of `$b` elements. That, in turn, is formulated into an array of two elements with another comma operator, and is left on the pipeline. Then, the horizontal `$x` is left on the pipeline. Abuses the default formatting of `Write-Output` to put a newline between elements.
### Example
```
PS C:\Tools\Scripts\golfing> .\the-letter-e-without-e.ps1 5 3 "z" "v" "d"
zdddz
v
v
v
zdddz
v
v
v
zdddz
```
[Answer]
# Python 3, 60 bytes
**A Function**
```
def p(a,b,c,d,e):q=c+e*(a-2)+c;return(q+'\n'+(d+'\n')*b)*2+q
```
**Test Case**
```
>>> print(p(8,2,'+','|','#'))
+######+
|
|
+######+
|
|
+######+
```
[Answer]
# Brainf\*ck, 147 bytes
```
,>,>++++++++[<------<------>>-]<<-->>>,>,>,>+++>++>++++++++++<<[-<<<.<<<[->>+>>>.<<<<<]>>[-<<+>>]>.>>>>>.<[-<<<<<<[->+>>.>>>>.<<<<<<<]>[<+>-]]>>>>]
```
Takes input from stdin as first 5 characters entered. The first two are have 48 subtracted from their ASCII code so 0-9 behave as expected. For numbers > 9, add 48 to the number and use the corresponding character. The other three characters are as specified in the challenge.
I'm sure it's not the optimal solution but life is too short to golf brainf\*ck.
With comments:
```
[
    Input: number number corner vertical horizontal
    Numbers are single digits; add 48 and use the ASCII character corresponding
    to the number you want for numbers > 9.
    First number is the number of characters across. Second is the number down.
    Layout: {first number-2} {second number} {temp} {a} {b} {c}
]
,>,>++++++++[<------<------>>-]<<-->>>,>,>,
now we should have the first five cells with the specified layout
the 6th will hold 3 as a counter and the 7th 2 and the 8th 10 '\n'
>+++>++>++++++++++<<
[  while the 6th cell is not 0
    -
    <<<.    print corner
    <<<[->>+>>>.<<<<<]  print horizontal characters
    >>[-<<+>>]         copy temp back to 1st cell
    >.>>>>>.           print corner and newline
    <
    [ If the second counter is not zero
        -
        <<<<<<[->+>>.>>>>.<<<<<<<]  print vertical and newline n times
        >[<+>-]           copy temp back to 2nd cell
    ]
    >>>>
]
```
Example run:
```
sean@SEANSBOX:~/Dropbox/Code/BF$ ./bf E.b
94^$!
^!!!!!!!^
$
$
$
$
^!!!!!!!^
$
$
$
$
^!!!!!!!^
```
[Answer]
## Lua(5.2), 144 bytes
```
k,a,p,q=loadstring,arg,io.write,print l,d=k"for i=3,a[1]do p(a[5])end",k"for i=1,a[2]do q(a[4])end"b=a[3]p(b)l()q(b)d()p(b)l()q(b)d()p(b)l()p(b)
```
[Try it online! (Coding Ground)](https://goo.gl/9NImBc "Try it!")
It should output something like that right now:
```
+@@@@@+
l
l
+@@@@@+
l
l
+@@@@@+
```
Own input: `7 2 + l @`
You can change the input in project->compile options and there change the values, each value as in the example but not separated by commas but by spaces.
[Answer]
# PHP, 97 bytes
```
list(,$w,$h,$c,$v,$r)=$argv;echo$b=str_pad($a=str_pad($c,++$w,$r)."$c\n",--$h*2+$w,"$v\n"),$b,$a;
```
no loop, only builtins.
Run with `php -r '<code>' <parameters>`.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 10 bytes
```
⇩*+Ǐ∇εJǏ∞⁋
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCLih6kqK8eP4oiHzrVKx4/iiJ7igYsiLCIiLCI3XG4tXG5AXG58XG4yIl0=)
```
 *         # Repeat the horizontal character...
⇩          # Horizontal distance - 2 times
  +Ǐ       # Prepend and append the corner character
    ∇ε     # Push the vertical character repeated by the amount
      J    # Append that to the line
       Ǐ   # Append the first line
        ∞  # Mirror
         ⁋ # Join by newlines
```
[Answer]
**Racket 124 bytes**
```
(λ(w h a b c)(for((i 3))(display a)(for((i w))(display c))(display a)(when(< i 2)(displayln "")(for((j h))(displayln b)))))
```
More readable form: 
```
(define(f w h a b c)
  (for((i 3))
    (display a)
    (for((i w))
      (display c))
    (display a)
    (when(< i 2)
      (displayln "")
      (for((j h))
        (displayln b)))))
```
Testing:
```
(f 7 2 "+" "|" "-" )
+-------+
|
|
+-------+
|
|
+-------+
```
[Answer]
# C++, 121 Bytes
```
#import<string>
#import<iostream>
#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;}
```
Ungolfed:
```
#import<string>
#import<iostream>
#define f(w,h,C,W,H){
    std::string s(w,W),t;  //define two strings, one empty, one with horizontal characters
    s = C+s+C+"\n";        //assemble a horizontal bar
    for(int i=h;i--;) 
        t=t+H+"\n";        //assemble a vertical bar
    std::cout<<s+t+s+t+s;  //print
}
```
In C++ its not allowed to declare functions without type as in C. But macros that behave just like a function are totally possible. Note also that the ungolfed version will not compile until you add a "\" to each but the last line of the macro.
You might save two additional bytes by removing the {}, but then you can't use the macro twice in a row.
Usage:
```
int main() {
    f(4,2,'+','-','|')
    f(2,1,'@','#','i')
    return 0;
}
```
Output:
```
+----+
|
|
+----+
|
|
+----+
@##@
i
@##@
i
@##@
```
[Try it online](http://ideone.com/Huo2Nw)
[Answer]
# [CJam](http://sourceforge.net/projects/cjam/), 23 bytes
```
riri)N*r2*\r*\@r**a3*\*
```
[Try it online!](http://cjam.tryitonline.net/#code=cmlyaSlOKnIyKlxyKlxAcioqYTMqXCo&input=NSAyICsgfCAt)
The input is is in the given order, but should be space separated instead of using a comma. Some of the difficulty is getting the input the right order for CJam's [join operation `*`](https://sourceforge.net/p/cjam/wiki/Basic%20operators/#4-join); for comparison rearranging the input in could [save 4 bytes](http://cjam.tryitonline.net/#code=cjIqcmlyKiphMypyaSlOKnIqKg&input=KyA1IC0gMiB8).
If the inputs are dubbed `A B C D E` then the program works something like this:
```
ri     e# get A as integer
ri)N*  e# create B+1 newlines
r2*    e# create 2 Cs
\r*    e# join newlines with D (hereafter ND)
\@     e# bring A & Cs to the front
r*     e# create A Es
*      e# join, puts Es between Cs (hereafter CEC)
a3*    e# makes 3 copies of CEC strings
\*     e# join, puts NDs between CECs
```
[Answer]
## QBIC, 44 bytes
```
::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X
```
Explanation
```
::;;;                 Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X                    Print the horizontal string
[1,2|                 Do the next thing twice
[1,b|?B]?X            Print the right number of vertical strings, then the horizontal string.
```
[Answer]
# PHP, 94 Bytes
```
<?list($v,$h,$p,$d,$r)=$_GET[a];for($h++;$i<=2*$h;)echo$i++%$h?$d:str_pad($p,$v-1,$r).$p,"\n";
```
Input format an array in the same order as the suggested string
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-R`](https://codegolf.meta.stackexchange.com/a/14339/), 18 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
Can't seem to do better than 18 :\
```
5õ_gVÇXÃ·¸pW²ùUY é
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVI&code=NfVfZ1bHWMO3uHBXsvlVWSDp&input=OCAzICIrIiAifCIgIiMi)
```
[W²ùUY é XpV y]ê ê
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVI&code=W1ey%2bVVZIOkgWHBWIHld6iDq&input=OCAzICIrIiAifCIgIiMi)
]