Project #13515 - MIPS Programming

 

Write a main program for the MIPS machine that uses syscall to repeatedly prompt the user to enter a string that represents a date in the form “day month” (for example: 25 March). “day” is the decimal day of the month, and ‘month” is the name of the month. The program should reject the day number if it is outside the allowed range for the particular month. For example, if the month February, then the day number must be between 1 and 28 (you may ignore leap years). The day number must be between 1 and 30 if the month is April, etc. For each valid day number and month combination, the program should display the day of the year (1 to 365) that corresponds to the valid day and month that was entered. All invalid day number and month combinations should be rejected.  The diagram below shows a sample execution of the program:

More Input (Y or N) : Y

Enter a day and month: 21 Janurary

The day of the year is: 21

More Input (Y or N) : Y

Enter a day and month: 29 February

Invalid combinaton

More Input (Y or N): Y

Enter a day and a month: 17 July

The day of the year is: 198

More Input (Y or N) : n

Program terminating

 

 

 

 

 

Subject Computer
Due By (Pacific Time) 09/30/2013 03:00 pm
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy