#includeint main(){int n,w,i; printf("请输入当月天数以及1日是星期几:\n"); scanf("%d%d",&n,&w); printf("Mo Tu We Th Fr Sa Su\n%*d ",-1+3*w++,1); for(i=2;i<=n;i++) {printf("%2d ",i); if(w++==7) {printf("\n"); w=1; } } return 0; }