Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help me write a program in c for this? 4. Write a program that takes in a date from the user and stores

Can you help me write a program in c for this? image text in transcribed
image text in transcribed
4. Write a program that takes in a date from the user and stores it in struct date.t, that has 3 elements unsigned short month, unsigned short day, unsigned short year. unsigned means the integer is either positive or zero. Use the token %hu for unsigned shorts in your format strings. Then calculate the zodiac sign for that date. For example, if the date entered is 8/28/12, you should print out August 28, Virgo. For zodiac dates use the Tropical Zodiac columns found in the table at http://en.wikipedia.org/wiki/Zodiac Don't forgot about leap years, but how you handle them is a design decision. You can determine if a year is a leap year by using the following: if (year % 4--O && year % 100 !-0) ll year % 400-_ 0) /leap year/ else /* not a leap year / You have to use the enumeration ienum month JAN 1, FEB, MAR, APR, MAY, JUNE, JUL, AUG, SEPT, 0CT, NOV, DEC in your code. Add a menu system asking if the user wants to keep entering a date or if they want to exit from the program. See below for an example of a simple menu system. Save this as lab4.q4.c and make a script called lab4.q4.script

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_2

Step: 3

blur-text-image_3

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

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions