| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Programming Exercises - Output

Page history last edited by Steve Sweeney 6 years, 6 months ago

1. Write a program to print the first line from your favourite quote or song.

2. Write a program to print the first line from your favourite quote or song, but put each word on a separate line.

 

3. Write a program to print each design.  You may find it helpful to use squared (graph) paper in planning the appearance of the output.

(a) PARALLELOG

     A        R

      R        A

       ALLELOGRAM

 

(b)   APEZO

     R     I

    TRAPEZOID

 

(c) RECTANGLE

    E       L

    C       G

    T       N

    A       A

    N       T

    G       C

    L       E

    ELGNATCER

 

(d)     D

       III

      AAAAA

     MMMMMMM

      OOOOO

       NNN

        D

4. Write a program that outputs each of your initials as a 7x7 block of the asterisk character (*).  For example:

 

    *******   *******

    *     *   *     *

    *         *

    *******   *******

          *         *

    *     *   *     *

    *******   *******

Comments (0)

You don't have permission to comment on this page.