Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 funny face help???
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
NAS




PostPosted: 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
Sponsor
sponsor
Tony




PostPosted: Thu Nov 14, 2002 1:12 am   Post subject: (No subject)

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

sorry, this board eliminates multiple spaces... Sad
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
NAS




PostPosted: Thu Nov 14, 2002 2:43 am   Post subject: (No subject)

what; the code dude?
Tony




PostPosted: 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 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"
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mike Pastah




PostPosted: 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. Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: