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

TOP

返回列表