Largest of three · 三个数的最大值
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
English
Largest of three
Return the biggest of three integers a, b, and c.
A simple way: start by assuming a is the largest, then compare it with b and with c, keeping the bigger value each time.
中文
三个数的最大值
返回三个整数 a、b、c 中最大的一个。
一个简单的办法:先假设 a 最大,然后依次和 b、c 比较,每次都保留较大的那个值。
Complete int max3(int a, int b, int c) to return the largest of the three integers. · 完成 int max3(int a, int b, int c),返回三个整数中最大的一个。
Click Run to see the output here. · 点击“运行”查看此处输出。