create an ascii progress bar well, it's something similar to this question but with a little differences. you have to write a program to ask for width of progress bar and how much work is done. and then draw a progress bar with following features:


width indicates how many characters you have to use to draw progress bar
progress is given via a floating point value between 0..1.
first and last character in progress bar should be something different from all other character, for example "[" and "]"
your program should use two different characters to how much progress passed since the start
you have to write how much work is done right in the middle of progress bar, using a decimal number + "%" sign.


bonus point for handling extreme inputs, such as 150% or -5% work done.

scoring number of characters * (1 without bonus or 0.75 width bonus) 

some examples of valid outputs

79 0.15
[||||||||||||                         15%                                     ]




25 0.76
[##########76%#####.....]




39 -0.12
[                 -12%                 ]




25 7.6
[##########760%#########]
J, 78×0.75 = 58.5

'w p'=:_".1!:1]3
1!:2&amp;4('%',~":100*p)(i.@[-&lt;.@-:@-)&amp;#}'[]'0 _1}' |'{~(w*p)&gt;i.w



$ echo -n 79 0.15 | jconsole test.ijs
[|||||||||||                          15%                                     ]
$ echo -n 25 0.76 | jconsole test.ijs
[||||||||||76%|||||     ]   
$ echo -n 39 -0.12
[                 _12%                ]
$ echo -n 25 7.6 | jconsole test.ijs
[|||||||||760%||||||||||]   


(Negative numbers in J are prefixed by _, not -.  Luckily, dyadic ". can parse both formats.)