返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.       cout<<"☆☆☆☆☆☆☆☆☆" <<endl;
  6.       float x, y;
  7.       cout<<"☆請輸入X:";
  8.       cin>>x;
  9.       cout<<"☆請輸入Y:";
  10.       cin>>y;
  11.       cout<<"☆你輸入的X為"<<x<<",Y為"<<y<<endl;
  12.       if(x>y)
  13.       {
  14.              cout<<"☆X大於Y"<<endl;
  15.       }
  16.       else if(x<y)
  17.       {
  18.              cout<<"☆X小於Y"<<endl;
  19.       }
  20.       else
  21.       {
  22.              cout<<"☆X等於Y"<<endl;
  23.       }
  24.       cout<<"☆☆☆☆☆☆☆☆☆"<<endl ;
  25.       
  26.       
  27.       system("pause");
  28.       return 0;
  29.       
  30. }
複製代碼

TOP

返回列表