Fortune Telling Collection - Comprehensive fortune-telling - 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:Zhu Wei Wealth _ Zhu Fengweishui
- Next article:Sanfeng Fortune Telling _ Sanfeng Master
- Related articles
- Where is the story of ancient Go?
- Seek enlightenment from ten small fables.
- Xiangshan Bird Fortune Teller _ Who is Xiangshan Bird Fortune Teller?
- Kunming Children's Fortune Teller _ Kunming Children's Fortune Teller
- Who is the boss of the city?
- Lovers cross array
- The name of the knitting factory with Chinese characters symbolizes great wealth and good luck.
- 1982 12 13 Finally, please ask the master to explain Wei Zitu in detail.
- Chaoshan divination _ Is Chaoshan divination accurate?
- Tianjin New Year Fortune Telling _ Tianjin New Year Fortune Telling Place