- #include<iostream>
- #include<cstdlib>
- #include<time.h>
- using namespace std;
- int main()
- {
- int num = 0;
- cout<<"☆★☆抽籤程式☆★☆"<<endl;
- cout<<"===================="<<endl;
- cout<<"★今天晚上要吃什麼★"<<endl;
- string j[]=
- {
- "豬肉",
- "牛肉",
- "雞肉",
- "羊肉",
- "鴨肉",
- "泡麵",
- "漢堡",
- "薯條",
- "雞塊",
- "餅乾",
- };
- srand(time(NULL));
- num=(rand()%10)+1;
- cout<<endl;
- cout<<"~今天晚上吃"<<j[num-1]<<"好了~"<<endl;
- cout<<endl;
- system("pause");
- return 0;
- }
複製代碼 |