- #include<iostream>
- using namespace std;
- int main()
- {
- cout<<"☆☆☆☆☆☆☆☆☆" <<endl;
- float x, y;
- cout<<"☆請輸入X:";
- cin>>x;
- cout<<"☆請輸入Y:";
- cin>>y;
- cout<<"☆你輸入的X為"<<x<<",Y為"<<y<<endl;
- if(x>y)
- {
- cout<<"☆X大於Y"<<endl;
- }
- else if(x<y)
- {
- cout<<"☆X小於Y"<<endl;
- }
- else
- {
- cout<<"☆X等於Y"<<endl;
- }
- cout<<"☆☆☆☆☆☆☆☆☆"<<endl ;
-
-
- system("pause");
- return 0;
-
- }
複製代碼 |