programming2-2max[1]

programming2-2max[1] - fprintf( '\n %.0f / %.0f / %.0f \n'...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
9T Enge1114 Programming2 10/22/2006 Ghorai, Chhandak %Ghorai, Chhandak %input: M= month, D=day, Y= Year M=input( '\n Input the month: ' ); D=input( '\n Input the day: ' ); Y=input( '\n Input the year: ' ); if M==12; D==31; M=1; D=1; Y=Y+1; fprintf( '\n %.0f / %.0f / %.0f \n' , M,D,Y) elseif D==30,31; M=M+1; D=1; fprintf( '\n %.0f / %.0f / %.0f \n' , M,D,Y) elseif M==2; D==28; M=M+1; D=1;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fprintf( '\n %.0f / %.0f / %.0f \n' , M,D,Y) else D=D+1; fprintf( '\n %.0f / %.0f / %.0f \n' , M,D,Y) end Input the month: 2 Input the day: 28 Input the year: 1995 3 / 1 / 1995 Input the month: 12 Input the day: 31 Input the year: 1999 1 / 1 / 2000 Input the month: 3 Input the day: 30 Input the year: 1988 4 / 1 / 1988 >>...
View Full Document

Ask a homework question - tutors are online