fork download
  1. fun main() {
  2. val firstUserEmailId = "user_one@gmail.com"
  3.  
  4. // The following line of code assumes that you named your parameter as emailId.
  5. // If you named it differently, feel free to update the name.
  6. println(displayAlertMessage(emailId = firstUserEmailId))
  7. println()
  8.  
  9. val secondUserOperatingSystem = "Windows"
  10. val secondUserEmailId = "user_two@gmail.com"
  11.  
  12. println(displayAlertMessage(secondUserOperatingSystem, secondUserEmailId))
  13. println()
  14.  
  15. val thirdUserOperatingSystem = "Mac OS"
  16. val thirdUserEmailId = "user_three@gmail.com"
  17.  
  18. println(displayAlertMessage(thirdUserOperatingSystem, thirdUserEmailId))
  19. println()
  20. }
  21.  
  22. fun displayAlertMessage(operatingSystem : String = "Unknow OS", emailId : String)
  23. = "There's a new sign-in request on $operatingSystem for your Google Account $emailId."
Success #stdin #stdout 0.08s 38040KB
stdin
Standard input is empty
stdout
There's a new sign-in request on Unknow OS for your Google Account user_one@gmail.com.

There's a new sign-in request on Windows for your Google Account user_two@gmail.com.

There's a new sign-in request on Mac OS for your Google Account user_three@gmail.com.