d059: 7-3-2 數學函數 max, min
Tags : c++
Accepted rate : 0人/0人 (0%) [非即時]
評分方式:
Tolerant

最近更新 : 2024-12-18 09:29

Content

max

函數原型: type max (type a,type b);

參數: type 任何數值資料類型。

a 和 b 是參與比較的兩個數,必須是相同類型。

功能和返回值: 比較 a 和 b 並返回其中較大者。

min

函數原型: type min (type a,type b);

參數: type 任何數值資料類型。

a 和 b 是參與比較的兩個數,必須是相同類型。

功能和返回值: 比較 a 和 b 並返回其中較小者。

Input
Output
Sample Input #1


											
										
Sample Output #1
max(5, 7) = 7
max('a', 'z') = z
max(1.96, 2.45) = 2.45
min(5, 7) = 5
min('a', 'z') = a
min(1.96, 2.45) = 1.96
測資資訊:
記憶體限制: 64 MB
公開 測資點#0 (100%): 1.0s , <1K
Hint :
Tags:
c++
出處:
[管理者: zero(育達管理員) ]


ID User Problem Subject Hit Post Date
沒有發現任何「解題報告」