funny face help???
Author |
Message |
NAS
|
Posted: 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? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Thu Nov 14, 2002 1:12 am Post subject: (No subject) |
|
|
```___
``/```\
`/```` \
`|`O`O`|
|```L```|
`|`._.``|
`\`````/
``\```/
``` ```
sorry, this board eliminates multiple spaces... |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
NAS
|
Posted: Thu Nov 14, 2002 2:43 am Post subject: (No subject) |
|
|
what; the code dude? |
|
|
|
|
|
Tony
|
Posted: Thu Nov 14, 2002 5:08 am Post subject: (No 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
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 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" |
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Mike Pastah
|
Posted: Thu Nov 14, 2002 6:06 am Post subject: (No 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. |
|
|
|
|
|
|
|