In this post, We will share a swift program to find the maximum of three numbers with an example. This is a basic swift program to understand the swift programming concept. If you are Swift beginners or want to learn the Swift programming, then this program will help you to understand the basic Swift programming concepts.
In the below example we have used
max() function to find the maximum of three numbers.
Copy the below program and create a file named “FindMaximumNumber.swift” and execute it.
let first = 10
let second = 15
let third = 18
let largest = max(max(first, second), third)
Liked this program? Do Like & share with your friends.
Editorial Staff at FreeWebMentor is a team of professional developers leads by Prem Tiwari View all posts by Editorial Staff