Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. fun area(shape: Shape): Double = when (shape) {
  2. is Rectangle -> shape.x * shape.y
  3. is Circle -> PI * shape.radius * shape.radius
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement