|
//2020年3月12日编写
#include
char c=' ';
void chang()//长函数
{
printf("___________");
}
void kuang()//宽函数
{
printf("|");
}
void zon(char cc)//总汇函数
{
int a;
printf("\n");
printf("|");
for(a=0;a<4;a++)
{
chang();
if(a<3)
printf("%c",cc);
}
printf("|");
}
void zon2(char a1[],char a2[],char a3[],char a4[])//总汇函数2
{
printf("\n");
printf("|%-11s|",a1);printf("%-11s|",a2);printf("%-11s|",a3);printf("%-11s|",a4);
}//函数;
main()
{
int a,b;
for(a=0;a<4;a++)//第一行
{
printf(" ");
chang();
}
printf("\n|%21c课程表%20c|",c,c);
zon(' ');
zon2(" ","1.2节","3.4节","5.6节");
zon('|');
zon2("星期一","语文","计算机","体育");//第二行
zon('|');
zon2("星期二","数学","政治","数学");//第三行
zon('|');
zon2("星期三","英语","体育","自习");//第四行
zon('|');
zon2("星期四","计算机","语文","体育");//第五行
zon('|');
zon2("星期五","计算机","英语","自习");//第六行
zon('|');
}
/*
printf(" ___________\n");// -=11;
printf("| 语 文 |\n");// |%2d字%3d字%2d|
printf("|___________|\n");// |%11d|
*/