Fortune Telling Collection - Horoscope - Constellation C language _ Constellation C language programming
Constellation C language _ Constellation C language programming
1) Set the array a[2] to store the month and day, and analyze it from the perspective of rationality.
Month a[0]∈[ 1, 12], a[ 1], that is, the date is determined according to a[0], and a[0] is 2, 4, 6, 9,1/kloc-0.
When a[0] is 2, a[ 1] cannot exceed 29. If you enter 29, you need to subtract 1 (as the basis for constellation calculation of later date difference).
2) The first function, int sum_day (int* a), takes the input just now as a formal parameter, calculates that M days of n months are K days of this year according to a certain formula, and then returns this date.
3) Because every constellation is 30 days apart (according to February 28th). Let's assume that this number of days is returned by K, and then discuss it by category.
The first one, K.
The second switch ((k- 19)/30) {
Case 0: Water bottle
Case 1: Pisces
........
- Previous article:What topics can primary school encyclopedia knowledge do?
- Next article:What movies did Chow Yun Fat mainly appear in?
- Related articles
- Did the three constellation men who changed their faces the fastest after falling in love change too much?
- Mascot of China Construction Bank
- Early September 12 the way of keeping fit in the zodiac!
- Capricorn girls, crazy about playing, will be captured by boys in which constellations and look forward to the rest of their lives?
- 12 star girl is the ultimate prey of which constellation man?
- What are the twelve constellations that can't be chased?
- Which constellations are kind-hearted, soft-hearted, gentle and kind-hearted, and worth cherishing with your heart?
- 1what are the sun and moon constellations on September 3, 984?
- The origin of the twelve constellations?
- Do you know those constellations that are unreasonable when they are angry and angry when they don't agree?