The user types in a birthday, and the program responds with the sign and horosco
ID: 3619946 • Letter: T
Question
The user types in a birthday, and the program responds with the sign and horoscope for that birthday. The month may be entered as a number from 1 to 12. Then, enhance your program so that if the birthday is only one or two days away from an adjacent sign, the program announces that the birthday is on a “cusp” and also outputs the horoscope for that nearest adjacent sign.
This program will have a long multiway branch. Make up a horoscope for each sign. Your program should include a loop that lets the user repeat this calculation until the user says she or he is done.
The horoscope signs and dates are:
Sign
Dates
Aries
March 21 – April 19
Taurus
April 20 – May 20
Gemini
May 21 – June 21
Cancer
June 22 – July 22
Leo
July 23 – August 22
Virgo
August 23 – September 22
Libra
September 23 – October 22
Scorpio
October 23 – November 21
Sagittarius
November 22 – December 21
Capricorn
December 22 – January 19
Aquarius
January 20 – February 18
Pisces
February 19 – March 20
I've been stoning for few hours on this question. Anyone can help me?
Sign
Dates
Aries
March 21 – April 19
Taurus
April 20 – May 20
Gemini
May 21 – June 21
Cancer
June 22 – July 22
Leo
July 23 – August 22
Virgo
August 23 – September 22
Libra
September 23 – October 22
Scorpio
October 23 – November 21
Sagittarius
November 22 – December 21
Capricorn
December 22 – January 19
Aquarius
January 20 – February 18
Pisces
February 19 – March 20
Explanation / Answer
//Header file section #include //Begin main function void main() { //Variable declartion int month, date; int startdate,startmonth,enddate,endmonth; char continues; do { //Inputting day printf("Enter the day of month for your birthday "); scanf("%d",date); //Inputting month printf(" Entre month of your birthday "); scanf("%d",month; if(month>12 || date>31) printf("Invalid input "); else { startdate = 21; enddate = 19; startmonth = 3; endmonth = 4; if(( month == startmonth && date >= startdate) ||(month == endmonth && date = enddate-3 && month == endmonth) printf("you are a cusp baby and with adjacent sign: Taurus "); else if(date = startdate) ||(month ==endmonth && date = enddate - 3 && month == endmonth) printf(" you are a cusp baby and with adjacent sign: Gemini "); else if(date = startdate)|| (month == endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign:Cancer "); else if(date = startdate) ||(month == endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign: Leo "); else if(date = startdate) ||(month == endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign: Virgo "); else if(date = startdate) ||(month == endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign: Libra "); else if(date = startdate) ||(month ==endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign: Scorpio "); else if(date = startdate) ||(month == endmonth && date = enddate - 3 && month == endmonth ) printf("you are a cusp baby and with adjacent sign: Sagitarius "; else if(date = startdate) ||(month == endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign: Sagitarius "); else if(date = startdate) ||(month ==endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign: Aquarius "); else if(date = startdate) ||(month ==endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign: Pisces "); else if(date = startdate) ||(month == endmonth && date = enddate - 3 && month == endmonth) printf("you are a cusp baby and with adjacent sign:Aries "); else if(dateRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.