Zodiac Program

SOLVED
Last edited on
if you know arrays, make an array that matches up..
string monthnames[13] {"invalid", "January",...
and monthnames[10] gives you back "october"

without that, you can do what you did already, a bunch of conditions .. if month == 10 stringmonth = "October" ... or similar logic.
Hi,

I think there is a better way of doing this:

Create a std::vector or an array of struct with this info as an example:

12,22,"saggitarius","capricorn" // similar for other months

Use that info to write your code.

At the moment, your code has to go through the entire logic to get to capricorn, the method I am thinking of will be easier.

I will leave up to you to figure out how to do it.
thank you sooo muchhh :>>
@raveneightttt

Please do NOT remove your questions once you've gotten an answer. It makes the thread useless as a learning resource for other posters.
@mikeyBoy, this is the OP's 2nd thread, and both are now trashed. I do believe he's another help thief. And troll.
Someone reported him, so he should disappear in a bit.
Topic archived. No new replies allowed.