- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- re:
- for(int i=1; i<=80; i+=1)
- {
- if(i>=1 && i<21)
- cout<<"歡";
- if(i>=21 && i<41)
- cout<<" 迎";
- if(i>=41 && i<61)
- cout<<" 光";
- if(i>=61 && i<81)
- cout<<" 臨";
- system("cls");
- }
- for(int g=1; g<=80; g+=1)
- {
- if(g>=1 && g<21)
- cout<<"歡";
- if(g>=21 && g<41)
- cout<<"歡迎";
- if(g>=41 && g<61)
- cout<<"歡迎光";
- if(g>=61 && g<81)
- cout<<"歡迎光臨";
-
- system("cls");
- }
- for(int f=1; f<=110; f+=1)
- {
- if(f>=1 && f<21)
- cout<<"歡迎光臨";
- if(f>=21 && f<41)
- cout<<" ";
- if(f>=41 && f<61)
- cout<<"歡迎光臨";
- if(f>=81 && f<101)
- cout<<" ";
- if(f>=101 && f<111)
- cout<<"歡迎光臨";
- system("cls");
- }
- goto re;
- system("pause");
- return 0;
- }
複製代碼 |