tvartup.nim 180 B

1234567891011
  1. discard """
  2. output: "2 3"
  3. """
  4. # Test the new tuple unpacking
  5. proc divmod(a, b: int): tuple[di, mo: int] =
  6. return (a div b, a mod b)
  7. var (x, y) = divmod(15, 6)
  8. echo x, " ", y