再次请教文字滚动问题
#include<stdio.h>void m1()
{
int i,j;
int m1[5][5]={{0,1,0,0,0},{0,1,0,0,0},{0,1,0,0,0},{0,1,0,0,0},{0,1,1,1,0}};
for(i=0;i<=4;i++)
{
for(j=0;j<=4;j++)
printf("%c",m1[i][j]);
printf("\n");
}
}
void m2()
{
int i,j;
int m1[5][5]={{0,1,1,1,0},{0,1,0,1,0},{0,1,0,1,0},{0,1,0,1,0},{0,1,1,1,0}};
for(i=0;i<=4;i++)
{
for(j=0;j<=4;j++)
printf("%c",m1[i][j]);
printf("\n");
}
}
void m3()
{
int i,j;
int m1[5][5]={{1,0,0,0,1},{0,1,0,1,0},{0,1,0,1,0},{0,1,0,1,0},{0,0,1,0,0}};
for(i=0;i<=4;i++)
{
for(j=0;j<=4;j++)
printf("%c",m1[i][j]);
printf("\n");
}
}
void m4()
{
int i,j;
int m1[5][5]={{0,1,1,1,0},{0,1,0,0,0},{0,1,1,1,0},{0,1,0,0,0},{0,1,1,1,0}};
for(i=0;i<=4;i++)
{
for(j=0;j<=4;j++)
printf("%c",m1[i][j]);
printf("\n");
}
}
void drawit()
{
int left=0,i,j;
for(i=0;i<60;i++)
{
system("cls");
if(left==1)
i-=2;
if((i==0)&&(left==1))
left=0;
if((i==59)&&(left==0))
{
i=i-2;
left=1;
}
for(j=0;j<i;j++)
printf(" ");
m1();
m2();
m3();
m4();
system("ping -n 1 127.1 > nul");
}
}
int main()
{
drawit();
return 0;
}
现在的问题是怎么让所有的拼接字符都滚动起来,
请高手不吝指教