int daysinMonth (int month)
{
int days;
switch (month){
case 1: case 3: case 5: case 7: case 8: case 10: case 12: days = 31; break;
case 4: case 6: case 9: case 11: days = 30; break;
case 2: days = 28;
}
return days;
}
So you can see that I need help getting all the days out as well as having the string of the months entered go into the function. I can only get it to work for months entered a numbers.
This post has been edited by Martyn.Rae: 22 March 2010 - 02:10 PM
Reason for edit:: Added code tags.

New Topic/Question
Reply




MultiQuote



|