吧|改成||试试
|
||
if month==x1|x2|x3 要用 if (month==x1 || month==x2 || month==x3)直接用数组int a[]={31,28,31,30...} //每月天数输入monthif month==2闰年,输出a[month-1]+1,否则输出a[month-1]else输出a[month-1]