<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Sample16</title> <link rel="stylesheet" href="sample16.css"> </head> <body> <h1>Sample16</h1> <div id="result"></div> <script type="application/dart" src="sample16.dart"></script> <script src="packages/browser/dart.js"></script> </body> </html>
import 'dart:html'; void main() { var num1 = 123.45; var num2 = 10; var n = num1 ~/ num2; querySelector("#result").text = n.toString(); }