#1
|
|||
|
|||
C++ Shape Program Help
Alright so I have this program due tomorrow and have no idea how to start it!! Click here and go to homework 3 http://www.cs.missouristate.edu/~liu/csc125/index.htm Any help would be greatly appreciated. Thanks
Mike |
#2
|
|||
|
|||
Re: C++ Shape Program Help
I would just use dynamic multi-dimensional arrays based on the parameters entered by the user...
|
#3
|
|||
|
|||
Re: C++ Shape Program Help
English please lol I'm in an intro class and know nothing about C++ Thanks
|
#4
|
|||
|
|||
Re: C++ Shape Program Help
[ QUOTE ]
English please lol I'm in an intro class and know nothing about C++ Thanks [/ QUOTE ] This is Java, so you're going to have to port it to C++ yourself: <font class="small">Code:</font><hr /><pre> while (student.takingClassForCredit() ) { try { student.DoYourOwnWork(); } catch (slackerException se) { if (se.Type == slackerException.gettingPissyAtPeopleWhoDoTryToHel p) { student.FOAD(); } } } </pre><hr /> |
#5
|
|||
|
|||
Re: C++ Shape Program Help
[ QUOTE ]
I would just use dynamic multi-dimensional arrays based on the parameters entered by the user... [/ QUOTE ] Why make is so advanced? All of those tasks can be solved using for loops, besides the menu coding of course. |
#6
|
|||
|
|||
Re: C++ Shape Program Help
[ QUOTE ]
English please lol I'm in an intro class and know nothing about C++ Thanks [/ QUOTE ] Basically arrays created on the fly. Your book should show this...otherwise just do a few searches online (your greatest resource for programming anyhow). For instance the rectangle...say the user wants one that is 4x8 I create 2-dimensional array [4][8] (really it'd be [x][y] or is it (x)(y)?...I can't remember) Then you'll just have to create the algorithm to give you the output to the array $$$$$$$$ $oooooo$ $oooooo$ $$$$$$$$ The o's is whitespace. As for the other 2, just look for the pattern...pretty easy to pick out. Once you figure the one out for the triangle, you'll then have the one for the diamond. |
#7
|
|||
|
|||
Re: C++ Shape Program Help
[ QUOTE ]
[ QUOTE ] I would just use dynamic multi-dimensional arrays based on the parameters entered by the user... [/ QUOTE ] Why make is so advanced? All of those tasks can be solved using for loops, besides the menu coding of course. [/ QUOTE ] True I just like arrays. heh |
#8
|
|||
|
|||
Re: C++ Shape Program Help
Thanks for the help. I think I can make it work that way.
Mike |
|
|