返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. int x;
  7. int y;
  8. int s;
  9. cout<<"這是一個占普程式"<<endl;
  10. cout<<"請輸入生日月份:"<<endl;
  11. cin>>x;
  12. cout<<"請輸入生日日期:"<<endl;
  13. cin>>y;
  14. s=(x*2+y)%3;
  15. if(s==0)
  16. {
  17. cout<<"您的運勢:普通"<<endl;
  18. }
  19. else if(s==1)
  20. {
  21. cout<<"您的運勢:好"<<endl;
  22. }
  23. else
  24. {
  25. cout<<"您的運勢:超好"<<endl;
  26. }
  27. system("pause");
  28. return 0;
  29. }
複製代碼

TOP

返回列表