VB中求a,b,c中最大值的编码是什么?

学习 时间:2026-04-01 13:59:44 阅读:473
VB中求a,b,c中最大值的编码是什么?

最佳回答

繁荣的猫咪

敏感的店员

2026-04-01 13:59:44

Dim a As Integer,b As Integer,c As Integer,Max As Integer,Min As Integera = InputBox("请输入a值")b = InputBox("请输入b值")c = InputBox("请输入c值")If a > b ThenMax = aMin = bElseMax = bMin = aEnd IfIf Max > c Then '确定最大值Max = MaxElseMax = cEnd IfIf Min < c Then '确定最小值Min = MinElseMin = cEnd IfPrint "Max=" & MaxPrint "Min=" & Min

最新回答共有2条回答

  • 和谐的翅膀
    回复
    2026-04-01 13:59:44

    Dim a As Integer,b As Integer,c As Integer,Max As Integer,Min As Integera = InputBox("请输入a值")b = InputBox("请输入b值")c = InputBox("请输入c值")If a > b ThenMax = aMin = bElseMax = bMin = aEnd IfIf Max > c Then '确定最大值Max = MaxElseMax = cEnd IfIf Min < c Then '确定最小值Min = MinElseMin = cEnd IfPrint "Max=" & MaxPrint "Min=" & Min

上一篇 怎么查看关注自己的人就是新版的i贴吧,我想屏蔽人

下一篇 描写秋景的好段小于50字 有四个字的好词 有好句