標題:
[作業] 跑馬燈 (四)
[打印本頁]
作者:
方浩葦
時間:
2024-7-27 11:14
標題:
[作業] 跑馬燈 (四)
利用跑馬燈,顯示訊息 "歡迎光臨",變換方式如附件。
歡迎光臨.exe
本帖隱藏的內容需要回復才可以瀏覽
作者:
洪榮辰
時間:
2024-7-28 11:17
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
re:
for(int i=1; i<=15; i++)
{
if(i==1)
cout<<"歡 "<<endl;
if(i==2)
cout<<" 迎 "<<endl;
if(i==3)
cout<<" 光 "<<endl;
if(i==4)
cout<<" 臨"<<endl;
if(i==5)
cout<<"歡 "<<endl;
if(i==6)
cout<<"歡迎 "<<endl;
if(i==7)
cout<<"歡迎光 "<<endl;
if(i==8)
cout<<"歡迎光臨"<<endl;
if(i==9)
cout<<" "<<endl;
if(i==10)
cout<<"歡迎光臨"<<endl;
if(i==11)
cout<<" "<<endl;
if(i==12)
cout<<"歡迎光臨"<<endl;
if(i==13)
cout<<" "<<endl;
if(i==14)
cout<<"歡迎光臨"<<endl;
if(i==15)
cout<<" "<<endl;
_sleep(300);
system("cls");
}
goto re;
system("pause");
return 0;
}
複製代碼
作者:
陳妍蓁
時間:
2024-8-2 21:42
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{ re:
for(int i=1;i<=13;i++){
if(i==1)
cout<<"歡 "<<endl;
if(i==2)
cout<<" 迎 "<<endl;
if(i==3)
cout<<" 光 "<<endl;
if(i==4)
cout<<" 臨"<<endl;
if(i==5)
cout<<"歡 "<<endl;
if(i==6)
cout<<"歡迎 "<<endl;
if(i==7)
cout<<"歡迎光 "<<endl;
if(i==8)
cout<<"歡迎光臨 "<<endl;
if(i==9)
cout<<" "<<endl;
if(i==10)
cout<<"歡迎光臨 "<<endl;
if(i==11)
cout<<" "<<endl;
if(i==12)
cout<<"歡迎光臨 "<<endl;
if(i==13)
cout<<" "<<endl;
_sleep(300);
system("cls");
}
goto re;
system("pause");
return 0;
}
複製代碼
作者:
李唯銘
時間:
2024-8-2 22:22
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
re:
for(int i=1; i<=15; i++)
{
if(i==1)
cout<<"歡 "<<endl;
if(i==2)
cout<<" 迎 "<<endl;
if(i==3)
cout<<" 光 "<<endl;
if(i==4)
cout<<" 臨"<<endl;
if(i==5)
cout<<"歡 "<<endl;
if(i==6)
cout<<"歡迎 "<<endl;
if(i==7)
cout<<"歡迎光 "<<endl;
if(i==8)
cout<<"歡迎光臨"<<endl;
if(i==9)
cout<<" "<<endl;
if(i==10)
cout<<"歡迎光臨"<<endl;
if(i==11)
cout<<" "<<endl;
if(i==12)
cout<<"歡迎光臨"<<endl;
if(i==13)
cout<<" "<<endl;
if(i==14)
cout<<"歡迎光臨"<<endl;
if(i==15)
cout<<" "<<endl;
_sleep(300);
system("cls");
}
goto re;
system("pause");
return 0;
}
複製代碼
作者:
林少謙
時間:
2024-8-3 15:15
#include<iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
int main()
{
re:
string a[]{"歡","迎","光","臨"};
for(int i=0; i<=3; i++)
{
cout<<a[i];
_sleep(500);
system("cls");
for(int j=0; j<=i; j++)
{
cout<<" ";
}
}
system("cls");
for(int i=0; i<=3; i++)
{
cout<<a[i];
_sleep(500);
}
for(int i=0; i<=2; i++)
{
system("cls");
_sleep(500);
cout<<"歡迎光臨";
_sleep(500);
}
system("cls");
_sleep(500);
goto re;
}
複製代碼
作者:
劉奕劭
時間:
2024-8-3 15:21
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
re:
for(int i=1; i<=15; i++)
{
if(i==1)
cout<<"歡 "<<endl;
if(i==2)
cout<<" 迎 "<<endl;
if(i==3)
cout<<" 光 "<<endl;
if(i==4)
cout<<" 臨"<<endl;
if(i==5)
cout<<"歡 "<<endl;
if(i==6)
cout<<"歡迎 "<<endl;
if(i==7)
cout<<"歡迎光 "<<endl;
if(i==8)
cout<<"歡迎光臨"<<endl;
if(i==9)
cout<<" "<<endl;
if(i==10)
cout<<"歡迎光臨"<<endl;
if(i==11)
cout<<" "<<endl;
if(i==12)
cout<<"歡迎光臨"<<endl;
if(i==13)
cout<<" "<<endl;
if(i==14)
cout<<"歡迎光臨"<<endl;
if(i==15)
cout<<" "<<endl;
_sleep(300);
system("cls");
}
goto re;
system("pause");
return 0;
}
複製代碼
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/)
Powered by Discuz! 7.2