#Help how do i get the min,max to work? (im not allowed to use the min, max functions)

1 messages ยท Page 1 of 1 (latest)

stone fableBOT
#

<@&987246399047479336> please have a look, thanks.

stone fableBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

#

Here is an AI assisted attempt to answer your question ๐Ÿค–. Maybe it helps! In any case, a human is on the way ๐Ÿ‘. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

To get the min and max values in Java, you can use the Math.min() and Math.max() methods. Here's an example:

int a = 10;
int b = 5;

int min = Math.min(a, b);
int max = Math.max(a, b);

System.out.println("Min value: " + min);
System.out.println("Max value: " + max);

Output:

Min value: 5
Max value: 10

In this example, Math.min(a, b) returns the minimum value between a and b, while Math.max(a, b) returns the maximum value.

frosty tree
#

Help how do i get the min,max to work? (im not allowed to use the min, max functions)