- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- for(int i=1;i<=1108 ;i++)
- {
- if(i>=1&&i<=100)
- cout<<"歡";
- if(i>=101&&i<=201)
- cout<<" 迎";
- if(i>=202&&i<=302)
- cout<<" 光";
- if(i>=303&&i<=403)
- cout<<" 臨";
- if(i>=404&&i<=504)
- cout<<"歡";
- if(i>=505&&i<=605)
- cout<<"歡迎";
- if(i>=606&&i<=706)
- cout<<"歡迎光";
- if(i>=806&&i<=906)
- cout<<"歡迎光臨";
- if(i>=907&&i<=1007)
- cout<<"歡迎光臨";
- if(i>=1008&&i<=1108)
- cout<<" ";
- if(i>=1109&&i<=1209)
- cout<<"歡迎光臨";
- if(i>=1210&&i<=1310)
- cout<<" ";
- if(i>=1311&&i<=1411)
- cout<<"歡迎光臨";
- system("cls");
-
- }
- system("pause");
- return 0;
- }
複製代碼 |