![]() |
|
#1
|
|||
|
|||
Menu driven drawing programHello again,
If I make it though this class it will be a miricle. Now I to do this and can't even get started text book not much help so here it goes, I really need help with this one. Write a menu driven appication that displays the following menu and draws shapes. Your program should run continuosly until the users selects to quit the program. In addition to the following outputs, turn in the psuedocode and a flow chart of your program. 1.) Draw a Diamond 2.) Draw a Wine Glass 3.) Draw a Triangle 4.) Quit the program. Am I wrong to think this is difficult if you have never programed what so ever and this is my first programming course. Any help I will be very happy to get. Thank you |
|
#2
|
|||
|
|||
Re: Menu driven drawing programCan anyone please give me a hand with the above ^^^^^ I'm really in need of some help.
Thanks |
|
#3
|
|||
|
|||
Re: Menu driven drawing programI finally got it does it look ok? I know a real programmer would do it much better and more simple but it works. Did I waste a lot of printf lines?
CPP / C++ / C Code:
Last edited by LuciWiz : 04-Oct-2006 at 00:23.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#4
|
||||
|
||||
Re: Menu driven drawing programQuote:
And what part of Last edited by admin. Reason: Please insert your C code between [cpp] & [/cpp] tags is so hard to understand? Every post you make with code has to be modified. Maybe you need to review the Guidelines again. __________________
Age is unimportant -- except in cheese |
|
#5
|
|||
|
|||
Re: Menu driven drawing programQuote:
Yes I didn't post it right sorry. Well I did it all wrong loops like you say is the way I'm supposed to do it. This is sort of what I have to get the program to draw except shapes are different and bigger. I can't figure out how you make it loop to print ***********'s in a certain order and placement. ******* **** ** * |
|
#6
|
||||
|
||||
Re: Menu driven drawing programYou have multiple lines. Therefore a loop is in order to go from line to line -- at least from top to line with the most *'s. There's loop #1.
Count the Spaces on the first line of your printf() attempt, then the second line. Is there a correlation between the numbers? Keep going for each line and compare each line for spaces. See a pattern? Loop #2 within loop #1 to print spaces. Now do exactly the same for the *'s. Loop #3 within loop #1, but after loop #2 to print *'s. There's your top triangle. Use [code][/code] tags to display your pattern: Code:
__________________
Age is unimportant -- except in cheese |
Recent GIDBlog
Developing GUIs with wxPython (Part 2) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 07:44 |
| Pipeline freeze simulation | darklightred | C++ Forum | 6 | 27-Jul-2006 19:37 |
| Shapes Functions Version 2 - Arrays! | Cecil | C Programming Language | 1 | 09-Jul-2006 20:39 |
| Help with a complex program | lordfuoco | C++ Forum | 5 | 24-Jun-2006 06:03 |
| How to read particular memory location ? | realnapster | C Programming Language | 10 | 10-May-2006 09:11 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The