C#发现数量最多 [英] C# find biggest number

查看:72
本文介绍了C#发现数量最多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它的第一次IM使用C#这样的IM不是很熟悉。我想创建一个简单的程序,找出最大的数,如果我在进入3号用户。我只需要知道要放什么东西在code,因为我不是很肯定。

Its the first time im using c# so im not very familiar with it. I would like to create a simple program to find the biggest number if i have the user entering 3 numbers. I just need to know what to put in the code, because i am not very sure.

推荐答案

使用 Math.Max​​

int x = 3, y = 4, z = 5;
Console.WriteLine(Math.Max(Math.Max(x, y), z));

这篇关于C#发现数量最多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆