Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you solve this for me ? Make sure it runs on Visual Studio Code and is univeristy level coding. Make sure it cannot be

Can you solve this for me? Make sure it runs on Visual Studio Code and is univeristy level coding. Make sure it cannot be detected by AIprintf("Please write the birth year ??
");
2. Get the user to type in the day, month (number), and year of a friend's birth.
3. Store both of these dates in a struct you will define (I am calling this zodiacDate but call it whatever you like)(5 points)
4. Write a function that takes a zodiacDate and returns a zSign. A zSign (defined below) is a number between 0 and 11. This number is the zodiac number.
For a zodiacDate between February 1,1924 and January 31,1925: This was the year of the rat. The zSign of it should be 0.
For a zodiacDate between February 1,1925 and January 31,1926: This was the year of the Ox. The zSign of it should be 1.
Use the zSign (defined at the bottom of this document) to find the associated zodiac animal text. Write a function that takes a zodiac number and returns a const char*. This may return something like "Ox", "Rat" or "Dog".
Steps 4 and 5 COULD be combined but we won't because we will use the signs to figure out if a friend is compatible with you.
Notice you can use a switch statement on a zSign. It might look likeThe "Four Animal Trines" are signs that work well together.
Rat, Dragon and Monkey are compatible (zSigns: 0,4, and 8)
Rabbit, Goat, and Pig are compatible (zSigns: 3,7, and 11)
Ox, Snake, and Rooster are compatible (zSigns: 1,5, and 9)
Tiger, Horse, and Dog make up the fourth compatible set (zSigns: 2,6, and 10)
These animals are exactly 4 numbers apart. Thus, we can find if someone is compatible with you if they have a difference of 0,4 or 8 from your zodiac number.
Examples:
If you are a dragon, a person born in July 1980 would be compatible (a monkey).
Someone born January 15,1984 would NOT be compatible with me because their sign is a pig (the year starts February 1)
Write a function isCompatibleZodiac that takes two zodiacDate parameters and returns 1(true) or 0(false).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

What is your theoretical orientation? (For Applied Programs Only)

Answered: 1 week ago

Question

LO5 Explain how to generate effective recruitment advertisements.

Answered: 1 week ago