Assignment submitted by Rishita Mahajanstudent number Essay


Assignment submitted by Rishita Mahajan.

Don't use plagiarized sources. Get Your Custom Essay on
Assignment submitted by Rishita Mahajanstudent number Essay
From as low as $9/Page
Order Essay

student number: 100371864

Assignment completed on 4th june

Assignment updated on 5th of june.

Refference is taken from = Text books, internet and class ppt.

steps to make this program;

step 1: declaring the values of the things we are gonna be using in the program step by step.

step 2:using switch and giving values in cases for the months of the year 2019.

step 3: using string function to





using namespace std;

int theDaysOfYear(int);

int theDaysOfYear(int num)


int days = 0;


switch (num)

{/* firstly, write all the cases in which all the months have 31 days,

like january, march, may, july, august, october, december.

Represented by the the serial number in which order they occur.*/

case 1:

case 3:

case 5:

case 7:

case 8:

case 10:

case 12:

days = 31;


/*Now, write all the months of the year 2019 who have 30 days which are:

april, june, september, november. Again represented by their serial number order in which they occur.


case 4:

case 6:

case 9:

case 11:

days = 30;


/*lastly, enter the month which has neither 30 days nor 31 and that month is 2nd month of the year: Feburary.


case 2:

days = 28;



return days;


int main()

{// using string functions to use the month and col in a way to use in reneendar

string months[]=


“January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December”


int row = 0, col = 1, rene[6][7] = {0};

int beginning = 1;

int days, thisYear = 2019;

string putTheMonthValue;

int monthOfYear;

cout > putTheMonthValue;

/*using if, else and else if function to define the values like which thing to use when we are given certain values. like if user enter month 1st then it

will show the first month of the year if not first month then it will show other else if values as according to the user value have been put in their.


if(putTheMonthValue == months[0])

{//for first month: January

monthOfYear = 1;


else if (putTheMonthValue == months[1])

{ // for second month: Feburary

monthOfYear = 2;


else if (putTheMonthValue == months[2])

{ // for third month: March

monthOfYear = 3;


else if (putTheMonthValue == months[3])

{ //Fourth month: April

monthOfYear = 4;


else if (putTheMonthValue == months[4])

{ //Fifth month: May

monthOfYear = 5;


else if (putTheMonthValue == months[5])

{ // Sixth month: June

monthOfYear = 6;


else if (putTheMonthValue == months[6])

{ // Seventh month: July

monthOfYear = 7;


else if (putTheMonthValue == months[7])

{ // Eighth month: August

monthOfYear = 8;


else if (putTheMonthValue == months[8])

{ // Ninth month: September

monthOfYear = 9;


else if (putTheMonthValue == months[9])

{ //tenth month : october

monthOfYear = 10;


else if (putTheMonthValue == months[10])

{ //eleventh month: November

monthOfYear = 11;


else if (putTheMonthValue == months[11])

{ //Twelth month: December

monthOfYear = 12;


//The values of month are in integer form so we are using int monthOfYear and int monthNew and here values of monthOfYear is monthOfYear and we have to put monthNew value as 0.

int onthOfYear = monthOfYear;

int monthNew = 0;

//here we are using while loop function. Add number of days to the beginning and divide by 7 to get the exact answer we want to


How Do I Place an Order With a Paper Writing Service??

Take a few steps to place an order on our site:

  • Fill out the form and state the deadline.
  • Calculate the price of your assignment order and pay for it with your credit card.
  • When the order is placed, we select a suitable expert writer to complete it based on your requirements.
  • Stay in contact with the writer and discuss vital details of research.
  • Download a preview of the research paper. Satisfied with the research paper outcome? Press “Approve.”

Feel secure when using our writing service

It's important for every customer to feel safe. Thus, at The Homework Writings, we take care of your security.

Financial security You can safely pay for your order using secure payment systems.
Personal security Any personal information about our customers is private. No other person can get access to it.
Academic security To deliver no-plagiarism samples, we use a specially-designed software to check every finished paper.
Web security This website is protected from illegal breaks. We constantly update our privacy management.

Get assistance with placing your order. Clarify any questions about our homework writing services. Contact our support team. They are available 24\7.

Still thinking about where to hire experienced authors and how to boost your grades? Place your order on our website and get help with any paper you need. We’ll meet your expectations.

Hire online writer Get a quote