Question: (a) Write a swift function called findmax to compare between two numbers and return the maximum one. Note that Omit the parameter labels during
(a) Write a swift function called findmax to compare between two numbers and return the maximum one. Note that Omit the parameter labels during the function call. The type of required function is: (Int, Int) -> Int (b) Call the function max with values 20, 30 and print the greater one.
Step by Step Solution
3.46 Rating (149 Votes )
There are 3 Steps involved in it
In Swift you can create a function called findmax to compare two numbers and retur... View full answer
Get step-by-step solutions from verified subject matter experts
