菜鸟求指导。。。主要不知道这个旋转怎么弄
编写一个程序,输入一个线段的长度n(2<n<10),循环输出这个线段围绕其一个端点顺时针旋转90°、180°、270°、360°的动图,按按任意键退出程序。
2020-03-18 15:31
2020-03-18 18:35
程序代码:
int a=0,j=0;
cin>>a;
while(1)
{
while(j<a)cout<<endl;
j=0;while(j<a)cout<<".";
Sleep(40); system("cls");
j=0;while(j<a)cout<<ends;
j=0;while(j<a)cout<<"."<<endl;
Sleep(40); system("cls");
j=0;while(j<a)cout<<ends;
j=0;while(j<a)cout<<".";
Sleep(40); system("cls");
j=0;while(j<a)cout<<endl;
j=0;while(j<a)cout<<ends;
j=0;while(j<a)cout<<"."<<endl;
Sleep(40); system("cls");
getch();
}
[此贴子已经被作者于2020-3-19 14:58编辑过]
2020-03-18 20:22
2020-03-21 14:12
2020-03-21 15:17
2020-03-21 15:42
2020-03-24 10:34
2020-03-24 17:52