Fortune Telling Collection - Zodiac Analysis - Constellation program _ Constellation software
Constellation program _ Constellation software
C language object-oriented packaging to achieve a constellation test program! Requirements: Given a date, you can judge what constellation it is and give it.
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)
- Related articles
- Constellation analysis what do zenith constellation and zenith constellation mean?
- Why is Maotai-flavor liquor so popular in Maotai Town?
- The most suitable martial spirit of the twelve constellations
- Who is the guardian of independent thought, chivalrous love and the love of the twelve constellations?
- Who's Wu Jiayi? When did she debut? How did you make your debut?
- Who has the most beautiful eyes in the twelve constellations?
- What constellation is 1 126?
- Which constellations are Aries destined to surrender?
- 1. 10 What is the birthday sign?
- Which constellation woman is a good wife _ which constellation woman is a good wife?