To get the maximum and minimum of two numbers using Swift, you can use the built-in max() and min() functions.
Here is an example code that shows how to get the maximum and minimum of two numbers:
let a = 5
let b = 10
// Get the maximum of a and b
let maxNumber = max(a, b) // Output: 10
// Get the minimum of a and b
let minNumber = min(a, b) // Output: 5
In this example, we have two variables a and b that contain the values 5 and 10 respectively. max() function is used to compare the two values and return the larger one as the output. Similarly, min() function is used to compare the two values and return the smaller one as output.