#include
void main()
{
int days,start;
printf("Enter the days:"埋租);
scanf("%d",&days);
printf("Enter the starting day:");
scanf("缺镇%d",&start);
for(int i=2-start;i<=days;i++)
{
if(i<=0)
printf(" ");
else
{printf("%5d",i);}
if((i+start-1)%7==0)
printf("\n");
}
printf("\n");
}
#include
#include
void main(void)
{
int days;
int str_week;
int i;
printf("Enter number of days in month:");
scanf("%d"穗老神,&days);
printf("猜亏Enter starting day of the week in (1=Sun,7=Sat):");
scanf("%d",&str_week);
for(i=1;i<=days;i++)
{
if(i%7==(2+(7-str_week)))
printf("\t\n");
printf("%2d ",i);
}
}
但是第一行有问题。。含睁
不是很难