Thursday
March 23, 2017

Post a New Question

Posted by on Wednesday, September 28, 2011 at 11:26pm.

Write a program that displays your initials in a pattern on the screen. Compose each initial with six lines of smaller initials, as the following example:

J FFFFFF
J F
J FFF
J F
J J F
JJJJJJ F

  • Programming using C# - , Thursday, September 29, 2011 at 12:21am

    The trick here is to design each letter in a 6x6 matrix. Each letter will therefore be made up of an array of 6 strings, each of which will have 6 characters.

    Example string array which can be name
    by the letters themselves:

    String[] f={
    "FFFFFF",
    "F",
    "FFF",
    "F",
    "F",
    "F"
    };

    So to display the letters, you only have to print them on six lines, like:

    for(int i=0;i<6;i++){
    System.out.println(j[i]+" "+f[i]);
    }


    (I am using Java syntax, hope you can do the conversion for C#)

Answer This Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Post a New Question