Computer Science Canada

funny face help???

Author:  NAS [ Wed Nov 13, 2002 4:15 pm ]
Post subject:  funny face help???

Write a program to draw a funny face in a window with its center at any point you speacify.make the face of a size 9 characters by 9 charcters Arange so that the color of the face and the backround can be input at the same as u specify its location in the execution?

Author:  Tony [ Thu Nov 14, 2002 1:12 am ]
Post subject: 

```___
``/```\
`/```` \
`|`O`O`|
|```L```|
`|`._.``|
`\`````/
``\```/
``` ```

sorry, this board eliminates multiple spaces... Sad

Author:  NAS [ Thu Nov 14, 2002 2:43 am ]
Post subject: 

what; the code dude?

Author:  Tony [ Thu Nov 14, 2002 5:08 am ]
Post subject: 

listen, if you're having trouble understanding how to print stuff to screen, then I don't think you should be taking programming... I mean if there's gonna be whole bunch of no-good programmers out there, then good programmers would not do as well in their career...

thats how you get some retarts writing code for windows... no wonder it always crashes Confused

sorry... I guess I went a bit off topic... anyway, the code is:

code:
put "first line of drawing"
put "2nd line of drawing"
...
put "9th line of drawing"


Now about locating it on the screen... just put
code:
locate(r,c)
in front of those lines where R(ow) and C(olumn) depend on users input.

code:
var r, c : int

get r
get c

locate (r,c)
put "blah"

Author:  Mike Pastah [ Thu Nov 14, 2002 6:06 am ]
Post subject: 

hmm.. I did it a way that could probably been done much easier, but here it is; pretty basic:

code:
import GUI
GUI.SetBackgroundColor (white)
var r, c, colourr, bgcolour : int

put "Type the row number: " ..
get r
put "Type the column numer: " ..
get c
put "Enter the colour you want the face to be: " ..
get colourr
put "Enter the colour you want the background to be: " ..
get bgcolour

cls

colorback (bgcolour)
Text.Color (colourr)

locate (r, c)
put "   ___   "
locate (r + 1, c)
put " /     \\ "
locate (r + 2, c)
put "| () () |"
locate (r + 3, c)
put "|   L   |"
locate (r + 4, c)
put "|       |"
locate (r + 5, c)
put "|  \\_/  |"
locate (r + 6, c)
put " \\     / "
locate (r + 7, c)
put "  \\___/  "



it works pretty well. Very Happy


: