- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int n;
- string f[]={"湯","飯","肉","麵","菜","水果"};
- cout<<"☆★☆抽籤程式☆★☆"<<endl;
- cout<<"今晚你要吃什麼"<<endl;
- system("cls");
- srand(time(NULL));
- for(int i=1;i<200;i++)
- {
- n=rand()%5;
- if(i%2==0)
- cout<<"☆★☆抽籤程式☆★☆"<<endl;
- else
- cout<<"★☆★抽籤中★☆★"<<endl;
- cout<<f[n]<<endl;
- system("cls");
- }
- cout<<"☆★☆抽籤程式☆★☆"<<endl;
- cout<<f[n]<<endl;
-
-
-
-
-
- system("pause");
- return 0;
-
- }
複製代碼 |