Fortune Telling Collection - Horoscope - How does c++ write the input constellation and output lucky index code?
How does c++ write the input constellation and output lucky index code?
Create enumeration
Constellation //enum constellation {}
Write the name of 12 constellation with {}.
Create a class
Build an array of classes
Store the information of 12 constellation respectively.
Put a constellation in the class
Start date of the stone break//Example: 0220
End date int Shu Jie // 032 1
……
//Other functions
Code:
First, judge which constellation the entered date belongs to.
Then print out the information in class.
You can do it yourself.
Exercise yourself.
You can format the date.
From 0 10 1 to 123 1
int riQi
For example, enter 0228.
It means February 28th.
Use the if statement if(riQi & gt;; Shikai & Japanese weather < = Shu Jie)
- Previous article:1987 What is the first day of the seventh lunar month?
- Next article:There are countless stars in the sky. How to grade stars?
- Related articles
- A girl's costume with twelve constellations.
- Is Gemini's personality abnormal?
- Analysis of Su Jin constellation _ Su Jin constellation
- The constellation man with the highest mental injury
- What constellation is the article _ What constellation is the article?
- Who is the strongest Altman? What constellation is he?
- Parents' favorite constellation girl
- Do I have to be a member to buy a box horse X member store?
- Virgo likes watching cartoons.
- Who is the monitor of the primary school in the zodiac?