- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int x;
- int y;
- int s;
- cout<<"這是一個占普程式"<<endl;
- cout<<"請輸入生日月份:"<<endl;
- cin>>x;
- cout<<"請輸入生日日期:"<<endl;
- cin>>y;
- s=(x*2+y)%3;
- if(s==0)
- {
- cout<<"您的運勢:普通"<<endl;
- }
- else if(s==1)
- {
- cout<<"您的運勢:好"<<endl;
- }
- else
- {
- cout<<"您的運勢:超好"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |