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

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Programming Exercises - Output

Page history last edited by Steve Sweeney 10 years, 1 month 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.