返回列表 發帖
本帖最後由 尤泓鈞 於 2011-11-19 15:04 編輯

#include<iostream>
using namespace std;
int main()
{
    int a,b,max;
    cout<<"請輸入第一個數";
    cin>>a;
    cout<<"請輸入第二個數";
    cin>>b;
    max=(a>b)?a:b;
    cout<<"兩數中比較大者為"<<max<<endl;                           
system("pause");
return 0;
}

TOP

返回列表