返回列表 發帖
  1. using namespace std;
  2. int main()
  3. {
  4.    int x,y;
  5.      cout<<"請輸入x:";
  6.      cin>>x;
  7.      cout<<"請輸入y:";
  8.      cin>>y;
  9.    if(x>y)
  10.     {
  11.               cout<<"x>y"<<endl;
  12.     }
  13.     else if(x<y)
  14.     {
  15.               cout<<"x<y"<<endl;   
  16.     }
  17.     else(x=y)
  18.     {
  19.               cout<<"x=y"<<endl;            
  20.     }
  21.     system("pause");
  22.     return 0;   
  23. }
複製代碼

TOP

返回列表