Advertisement
Muhammad_Farroos

function tiga parameter

Feb 8th, 2021
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. * You can edit, run, and share this code.
  3. * play.kotlinlang.org
  4. */
  5.  
  6. fun example(a: Int,b: String,c: Double): Int{
  7. val convert = b.toInt()
  8. val sum = a + convert + c
  9. val total = sum.toInt()
  10. return total
  11. }
  12.  
  13.  
  14. fun main() {
  15. val result = example(2,"3",2.2)
  16. print(result)
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement