Month Example Mat Lab Program

% Design by Erik Rosado | http://erikrosado.com

clear

m = input (‘Enter Month Value; 1 to 12: ‘)

if m==1; % m = month value.

d=31; % d = days value.

(‘January’) % month display value.

else
if m==2;

d=59;

(‘February’)

else
if m==3;

d=90;

(‘March’);

else
if m==4;

d=120;

(‘April’)

else
if m==5;

d=151;

(‘May’);

else
if m==6;

d=181;

(‘June’)

else
if m==7;

d=212;

(‘July’)

else
if m==8;

d=243;

(‘August’)

else
if m==9;

d=273;

(‘September’);

else
if m==10;

d=304;

(‘October’)

else
if m==11;

d=334;

(‘Nobember’);

else
if m==12;

d=365;

(‘December’)

else
if m>12;

(‘Enter Numerical Value for Month, Example: 1 for January to 12 for December.’)

end

end

end

end

end

end

end

end

end

end

end

end

end