Question: Intro to C++ Programming Instruction : Code I entered : #include #include using namespace std; int main() { const int MonthDays[] = {31, 59, 90,

Intro to C++ Programming

Instruction :

Intro to C++ Programming Instruction : Code I entered : #include #includeCode I entered :

#include #include using namespace std;

int main() { const int MonthDays[] = {31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}; const string MonthName[] = {"January","February","March","April","May","June","July","August","September","October","November","December"}; int day; int month=0; cout>day; cout365) day=day%365; while (MonthDays[month]31) cout

Error I got:

using namespace std; int main() { const int MonthDays[] = {31, 59,

Could you fix my code?

Given a number, calculate how many years into the future it is, and what date. Assume no leap years For example: Please enter a day of the year (0 to exit): 1 jan 1 Please enter a day of the year (O to exit); 365 dec 31 Please enter a day of the year (0 to exit): 366 jan 1 Please enter a day of the year (0 to exit): 0 Thanks for playing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!