computes days of the week

1 次查看(过去 30 天)
lowcalorie
lowcalorie 2012-2-22
I need help writting a script that computes the days of the week for years 2010,2011, and 2012 i need the input to be of xx/xx/xxxx.
and the output to be say something like
"xx/xx/xxxx is the 243 day of the year and falls on a wednesday."
so far i only have:
n = input('Enther month, day and year in the form xx/xx/xxxx for 2012, 2011, or 2012: ')
im not sure how to go about doing the rest anyone have any suggestions?? please help! I need to use IF statements

回答(1 个)

Jonathan Sullivan
Jonathan Sullivan 2012-2-22
help weekday
doc weekday
  2 个评论
Jonathan Sullivan
Jonathan Sullivan 2012-2-22
weekday('02/22/2012')
lowcalorie
lowcalorie 2012-2-22
How can i do this using if statements

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by