C++ programming windows application console!! Write a program that prompts for t
ID: 3924548 • Letter: C
Question
C++ programming windows application console!!
Write a program that prompts for the day and month of the user's birthday, then prompts first for the user's occupation (programmer, nurse or teacher) using a switch statement, and then prints a horoscope. Make up fortunes that might apply to programmers. A programmer's fortune might look something like this: Cancer: You are extremely analytical and often suffer from "Paralysis by Analysis". Your work is often late but your attention to detail is unmatched. A nurse's fortune might look something like this: Gemini: Your patient skills are of the highest order. Patients love you and often send you letters of appreciation when they recover from their illness. A teacher's fortune might look something like this: Aries: You are considered a "tough" teacher. You will not tolerate late assignments, lateness for class or anything less than perfection. Each fortune should contain the name of the astrological sign.Explanation / Answer
#include <iostream>
#include<cstring>
using namespace std;
int main()
{
int date;
char month[10];
char occupation[15];
cout<<"Enter the birth month"<<endl;
cin>>month;
cout<<endl<<"Enter the birth date"<<endl;
cin>>date;
cout<<endl<<"Enter your occupation"<<endl;
cin>>occupation;
switch(month[15]){
case 'April':
if(date<=19){
if(strcmp(occupation,"Programmer"))
cout<<"Aries:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Aries:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Aries:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Tarus:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Tarus:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Tarus:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'March':
if(date>=21){
if(strcmp(occupation,"Programmer"))
cout<<"Aries:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Aries:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Aries:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Pisces:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Pisces:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Pisces:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'May':
if(date>=21){
if(strcmp(occupation,"Programmer"))
cout<<"Geminie:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Geminie:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Geminie:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Tarus:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Tarus:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Tarus:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'June':
if(date<=20){
if(strcmp(occupation,"Programmer"))
cout<<"Geminie:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Geminie:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Geminie:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Cancer:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Cancer:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Cancer:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'July':
if(date<=22){
if(strcmp(occupation,"Programmer"))
cout<<"Cancer:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Cancer:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Cancer:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Leo:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Leo:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Leo:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'August':
if(date>=23){
if(strcmp(occupation,"Programmer"))
cout<<"Virgo:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Virgo:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Virgo:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Leo:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Leo:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Leo:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'September':
if(date<=22){
if(strcmp(occupation,"Programmer"))
cout<<"Virgo:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Virgo:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Virgo:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Libra:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Libra:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Libra:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'October':
if(date>=23){
if(strcmp(occupation,"Programmer"))
cout<<"Scirpio:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Scirpio:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Scirpio:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Libra:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Libra:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Libra:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'November':
if(date<=21){
if(strcmp(occupation,"Programmer"))
cout<<"Scirpio:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Scirpio:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Scirpio:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Sagittarus:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Sagittarus:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Sagittarus:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'December':
if(date>=22){
if(strcmp(occupation,"Programmer"))
cout<<"Capricorn:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Capricorn:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Capricorn:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Sagittarus:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Sagittarus:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Sagittarus:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'January':
if(date<=19){
if(strcmp(occupation,"Programmer"))
cout<<"Capricorn:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Capricorn:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Capricorn:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Aquarious:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Aquarious:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Aquarious:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
case 'February':
if(date>=19){
if(strcmp(occupation,"Programmer"))
cout<<"Pisces:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Pisces:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Pisces:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
else{
if(strcmp(occupation,"Programmer"))
cout<<"Aquarious:You are extremely analytical and often suffer from 'paralysis by analysis' your work is often late but you'r attention to details is unmathed"<<endl;
else if(strcmp(occupation,"nurse"))
cout<<"Aquarious:Your patience skills are of high order.Patients love you and often sends letters of appreciation when they recover from the illness"<<endl;
else
cout<<"Aquarious:Your considered a tough teacher.You will not tolerate last assignment,lateness for class or anything less than perfection"<<endl;
}
break;
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.