Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 added 24 characters in body
source | link

C#, 153 151151 150

This can't really compete but here it is just for fun:

(h,w)=>{string s="=",e="\n",a="====",b="   =",m=a,o;for(into;int i=0;i++<=h*2;i=0,j;for(;i++<=h*2;){o=s;for(int j=0;j++<w+1;o=m)System.Console.Write(o);m=m==a?b:a;s=e+s;e="";}}

How to run:

public class Program
{
    public static void Main()
    {
        new System.Action<int, int>((h,w)=>{string s="=",e="\n",a="====",b="   =",m=a,o;for(into;int i=0;i++<=h*2;i=0,j;for(;i++<=h*2;){o=s;for(int j=0;j++<w+1;o=m)System.Console.Write(o);m=m==a?b:a;s=e+s;e="";}})(3, 4);
    }
}

Open for improvements.

C#, 153 151

This can't really compete but here it is just for fun:

(h,w)=>{string s="=",e="\n",a="====",b="   =",m=a,o;for(int i=0;i++<=h*2;){o=s;for(int j=0;j++<w+1;o=m)System.Console.Write(o);m=m==a?b:a;s=e+s;e="";}}

How to run:

public class Program
{
    public static void Main()
    {
        new System.Action<int, int>((h,w)=>{string s="=",e="\n",a="====",b="   =",m=a,o;for(int i=0;i++<=h*2;){o=s;for(int j=0;j++<w+1;o=m)System.Console.Write(o);m=m==a?b:a;s=e+s;e="";}})(3, 4);
    }
}

Open for improvements.

C#, 153 151 150

This can't really compete but here it is just for fun:

(h,w)=>{string s="=",e="\n",a="====",b="   =",m=a,o;int i=0,j;for(;i++<=h*2;){o=s;for(j=0;j++<w+1;o=m)System.Console.Write(o);m=m==a?b:a;s=e+s;e="";}}

How to run:

public class Program
{
    public static void Main()
    {
        new System.Action<int, int>((h,w)=>{string s="=",e="\n",a="====",b="   =",m=a,o;int i=0,j;for(;i++<=h*2;){o=s;for(j=0;j++<w+1;o=m)System.Console.Write(o);m=m==a?b:a;s=e+s;e="";}})(3, 4);
    }
}

Open for improvements.

1
source | link

C#, 153 151

This can't really compete but here it is just for fun:

(h,w)=>{string s="=",e="\n",a="====",b="   =",m=a,o;for(int i=0;i++<=h*2;){o=s;for(int j=0;j++<w+1;o=m)System.Console.Write(o);m=m==a?b:a;s=e+s;e="";}}

How to run:

public class Program
{
    public static void Main()
    {
        new System.Action<int, int>((h,w)=>{string s="=",e="\n",a="====",b="   =",m=a,o;for(int i=0;i++<=h*2;){o=s;for(int j=0;j++<w+1;o=m)System.Console.Write(o);m=m==a?b:a;s=e+s;e="";}})(3, 4);
    }
}

Open for improvements.