Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64PE v4.0 is now live!!
#30
(Yesterday, 09:28 PM)RhoSigma Wrote:
(Yesterday, 09:14 PM)a740g Wrote: I am guessing from the image that you want to get the max of 3 numbers.

Code: (Select All)
maxOfThree = _IIF(a > b, _IIF(a > c, a, c), _IIF(b > c, b, c))

Less writing:
Code: (Select All)
maxOfThree = _MAX(_MAX(a, b), c)
Thanks to a740g and RhoSigma for the effort. @RhoSigma, it works!

I love this kind of thing: simple and clear!  Tongue  Thanks!

Code: (Select All)

'Tenaeren Operator in QB64 ab Vers. 4.0 - 16. Dez. 2024
'Dank an a740g und RhoSigma - 17. Dez 2024

Option _Explicit

Dim As Long zahl1, zahl2, zahl3, max

Locate 3, 3
Print "Dreifach tenaerer Operator in QB64"
Locate 4, 3
Print "=================================="

Locate 6, 3
Input "Zahl 1: ", zahl1

Locate 7, 3
Input "Zahl 2: ", zahl2

Locate 8, 3
Input "Zahl 3: ", zahl3

max = _Max(_Max(zahl1, zahl2), zahl3)

Locate 10, 3
Print Using "Die groesste Zahl ist: ####"; max

End
Reply


Messages In This Thread
QB64PE v4.0 is now live!! - by SMcNeill - 12-14-2024, 10:17 AM
RE: QB64PE v4.0 is now live!! - by PhilOfPerth - 12-14-2024, 12:37 PM
RE: QB64PE v4.0 is now live!! - by RhoSigma - 12-14-2024, 01:36 PM
RE: QB64PE v4.0 is now live!! - by mdijkens - 12-14-2024, 01:04 PM
RE: QB64PE v4.0 is now live!! - by Kernelpanic - 12-14-2024, 03:54 PM
RE: QB64PE v4.0 is now live!! - by JRace - 12-14-2024, 09:53 PM
RE: QB64PE v4.0 is now live!! - by PhilOfPerth - 12-14-2024, 11:10 PM
RE: QB64PE v4.0 is now live!! - by JRace - 12-14-2024, 11:20 PM
RE: QB64PE v4.0 is now live!! - by SMcNeill - 12-14-2024, 11:38 PM
RE: QB64PE v4.0 is now live!! - by GareBear - 12-14-2024, 11:34 PM
RE: QB64PE v4.0 is now live!! - by RhoSigma - 12-15-2024, 12:53 AM
RE: QB64PE v4.0 is now live!! - by bert22306 - 12-15-2024, 10:37 PM
RE: QB64PE v4.0 is now live!! - by grymmjack - 12-15-2024, 11:08 AM
RE: QB64PE v4.0 is now live!! - by RhoSigma - 12-15-2024, 11:42 AM
RE: QB64PE v4.0 is now live!! - by doppler - 12-15-2024, 11:25 AM
RE: QB64PE v4.0 is now live!! - by doppler - 12-15-2024, 01:14 PM
RE: QB64PE v4.0 is now live!! - by a740g - 12-15-2024, 02:03 PM
RE: QB64PE v4.0 is now live!! - by doppler - 12-15-2024, 02:36 PM
RE: QB64PE v4.0 is now live!! - by zaadstra - 12-15-2024, 04:59 PM
RE: QB64PE v4.0 is now live!! - by hanness - 12-15-2024, 10:38 PM
RE: QB64PE v4.0 is now live!! - by bert22306 - 12-15-2024, 11:10 PM
RE: QB64PE v4.0 is now live!! - by madscijr - 12-16-2024, 01:50 PM
RE: QB64PE v4.0 is now live!! - by hsiangch_ong - 12-16-2024, 03:21 PM
RE: QB64PE v4.0 is now live!! - by Kernelpanic - Yesterday, 08:05 PM
RE: QB64PE v4.0 is now live!! - by a740g - Yesterday, 09:09 PM
RE: QB64PE v4.0 is now live!! - by a740g - Yesterday, 09:14 PM
RE: QB64PE v4.0 is now live!! - by RhoSigma - Yesterday, 09:28 PM
RE: QB64PE v4.0 is now live!! - by Kernelpanic - Yesterday, 10:36 PM
RE: QB64PE v4.0 is now live!! - by RhoSigma - Yesterday, 11:04 PM
RE: QB64PE v4.0 is now live!! - by bert22306 - Yesterday, 10:04 PM



Users browsing this thread: a740g, Stuart, 22 Guest(s)