返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.   int x;
  7.   int y;
  8.   
  9.   cout<<"請輸入x:";
  10.   cin>>x;
  11.   cout<<"請輸入y:";
  12.   cin>>y;

  13.   if(x==y)  
  14.   cout<<"x=y"<<endl;
  15.   
  16.   else if(x>y)
  17.   cout<<"x>y"<<endl;

  18.   else  
  19.   cout<<"x<y"<<endl;
  20.   
  21.   system("pause");
  22.   return 0;
  23. }  
複製代碼

TOP

返回列表